Added support for more widgets.
- Added QCalendarWidget support (undocumented, and went from ugly to nice). - Added QSplashScreen support. - Added tests for more widgets.main
After Width: | Height: | Size: 4.1 MiB |
|
@ -0,0 +1,5 @@
|
|||
<svg width="90" height="90">
|
||||
<g transform="scale(10)">
|
||||
<path d="m 0.9166972,1.1894593 3.310321,3.3105408 -3.3117417,3.3105408 c -0.157702,0.1577125 -0.157702,0.4134624 0,0.5711749 0.157702,0.1577123 0.4134349,0.1577123 0.5711369,0 l 3.5973102,-3.5961283 0,0 0,0 c 0.1577019,-0.1577124 0.1577019,-0.4134624 0,-0.5711748 L 1.4864134,0.61828437 c -0.157702,-0.1577124 -0.4134349,-0.1577124 -0.5711369,0 -0.1562813,0.1577125 -0.1562813,0.41346243 0.00142,0.57117493 z" fill="^0^"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 498 B |
|
@ -0,0 +1,5 @@
|
|||
<svg width="90" height="90">
|
||||
<g transform="scale(10)">
|
||||
<path d="m 5.0823028,1.1894593 -3.310321,3.3105408 3.3117417,3.3105408 c 0.157702,0.1577125 0.157702,0.4134624 0,0.5711749 -0.157702,0.1577123 -0.4134349,0.1577123 -0.5711369,0 l -3.59731017,-3.5961283 0,0 0,0 c -0.15770191,-0.1577124 -0.15770191,-0.4134624 0,-0.5711748 L 4.5125866,0.61828437 c 0.157702,-0.1577124 0.4134349,-0.1577124 0.5711369,0 0.1562813,0.1577125 0.1562813,0.41346243 -0.00142,0.57117493 z" fill="^0^"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 501 B |
|
@ -78,6 +78,8 @@
|
|||
<file>dark/checkbox_indeterminate_disabled.svg</file>
|
||||
<file>dark/checkbox_unchecked.svg</file>
|
||||
<file>dark/checkbox_unchecked_disabled.svg</file>
|
||||
<file>dark/calendar_next.svg</file>
|
||||
<file>dark/calendar_previous.svg</file>
|
||||
<file>dark/radio_checked.svg</file>
|
||||
<file>dark/radio_checked_disabled.svg</file>
|
||||
<file>dark/radio_unchecked.svg</file>
|
||||
|
|
5282
breeze_resources.py
|
@ -112,6 +112,14 @@ assets = {
|
|||
'vline': {
|
||||
'default': ['tree'],
|
||||
},
|
||||
'calendar_next': {
|
||||
'default': ['foreground'],
|
||||
'hover': ['hover'],
|
||||
},
|
||||
'calendar_previous': {
|
||||
'default': ['foreground'],
|
||||
'hover': ['hover'],
|
||||
},
|
||||
}
|
||||
|
||||
def replace(contents, colors, color_map):
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<svg width="90" height="90">
|
||||
<g transform="scale(10)">
|
||||
<path d="m 0.9166972,1.1894593 3.310321,3.3105408 -3.3117417,3.3105408 c -0.157702,0.1577125 -0.157702,0.4134624 0,0.5711749 0.157702,0.1577123 0.4134349,0.1577123 0.5711369,0 l 3.5973102,-3.5961283 0,0 0,0 c 0.1577019,-0.1577124 0.1577019,-0.4134624 0,-0.5711748 L 1.4864134,0.61828437 c -0.157702,-0.1577124 -0.4134349,-0.1577124 -0.5711369,0 -0.1562813,0.1577125 -0.1562813,0.41346243 0.00142,0.57117493 z" fill="#eff0f1"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 502 B |
|
@ -0,0 +1,5 @@
|
|||
<svg width="90" height="90">
|
||||
<g transform="scale(10)">
|
||||
<path d="m 0.9166972,1.1894593 3.310321,3.3105408 -3.3117417,3.3105408 c -0.157702,0.1577125 -0.157702,0.4134624 0,0.5711749 0.157702,0.1577123 0.4134349,0.1577123 0.5711369,0 l 3.5973102,-3.5961283 0,0 0,0 c 0.1577019,-0.1577124 0.1577019,-0.4134624 0,-0.5711748 L 1.4864134,0.61828437 c -0.157702,-0.1577124 -0.4134349,-0.1577124 -0.5711369,0 -0.1562813,0.1577125 -0.1562813,0.41346243 0.00142,0.57117493 z" fill="#3daee9"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 502 B |
|
@ -0,0 +1,5 @@
|
|||
<svg width="90" height="90">
|
||||
<g transform="scale(10)">
|
||||
<path d="m 5.0823028,1.1894593 -3.310321,3.3105408 3.3117417,3.3105408 c 0.157702,0.1577125 0.157702,0.4134624 0,0.5711749 -0.157702,0.1577123 -0.4134349,0.1577123 -0.5711369,0 l -3.59731017,-3.5961283 0,0 0,0 c -0.15770191,-0.1577124 -0.15770191,-0.4134624 0,-0.5711748 L 4.5125866,0.61828437 c 0.157702,-0.1577124 0.4134349,-0.1577124 0.5711369,0 0.1562813,0.1577125 0.1562813,0.41346243 -0.00142,0.57117493 z" fill="#eff0f1"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 505 B |
|
@ -0,0 +1,5 @@
|
|||
<svg width="90" height="90">
|
||||
<g transform="scale(10)">
|
||||
<path d="m 5.0823028,1.1894593 -3.310321,3.3105408 3.3117417,3.3105408 c 0.157702,0.1577125 0.157702,0.4134624 0,0.5711749 -0.157702,0.1577123 -0.4134349,0.1577123 -0.5711369,0 l -3.59731017,-3.5961283 0,0 0,0 c -0.15770191,-0.1577124 -0.15770191,-0.4134624 0,-0.5711748 L 4.5125866,0.61828437 c 0.157702,-0.1577124 0.4134349,-0.1577124 0.5711369,0 0.1562813,0.1577125 0.1562813,0.41346243 -0.00142,0.57117493 z" fill="#3daee9"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 505 B |
|
@ -513,8 +513,8 @@ def main(argv=None):
|
|||
|
||||
# run
|
||||
window.show()
|
||||
app.exec_()
|
||||
return app.exec_()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
sys.exit(main(sys.argv))
|
||||
|
|
20
test.py
|
@ -33,6 +33,7 @@ import argparse
|
|||
import os
|
||||
import random
|
||||
import sys
|
||||
import time
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
import breeze_resources
|
||||
|
@ -530,6 +531,21 @@ def main(argv=None):
|
|||
elif args.widget == 'tooltip':
|
||||
child = QtWidgets.QPushButton('Sample Label')
|
||||
child.setToolTip('Sample Tooltip')
|
||||
elif args.widget == 'splashscreen':
|
||||
# This doesn't work with a central widget.
|
||||
# Handle the run here.
|
||||
pixmap = QtGui.QPixmap('assets/Yellowstone.jpg')
|
||||
size = app.screens()[0].size()
|
||||
scaled = pixmap.scaled(size, QtCore.Qt.KeepAspectRatio)
|
||||
splash = QtWidgets.QSplashScreen(scaled)
|
||||
splash.show()
|
||||
time.sleep(5)
|
||||
splash.finish(window)
|
||||
window.show()
|
||||
return app.exec()
|
||||
elif args.widget == 'calendar':
|
||||
child = QtWidgets.QCalendarWidget(widget)
|
||||
child.setGridVisible(True)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
|
@ -549,7 +565,7 @@ def main(argv=None):
|
|||
|
||||
# run
|
||||
window.show()
|
||||
app.exec_()
|
||||
return app.exec_()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
sys.exit(main(sys.argv))
|
||||
|
|
|
@ -810,6 +810,7 @@ QAbstractSpinBox
|
|||
color: #eff0f1;
|
||||
border-radius: 0.09em;
|
||||
min-width: 2.6em;
|
||||
min-height: 1em;
|
||||
margin: 0.9em;
|
||||
margin-left: 2.3em;
|
||||
/* To deal with the padding of the arrows */
|
||||
|
@ -887,6 +888,46 @@ QDoubleSpinBox
|
|||
min-width: 5em;
|
||||
}
|
||||
|
||||
/**
|
||||
* `QCalendarWidget QAbstractItemView:enabled` sets the color, background
|
||||
* color, and selection color for active dates in the view.
|
||||
* `QCalendarWidget QAbstractItemView:enabled` sets the disabled dates.
|
||||
*/
|
||||
QCalendarWidget QAbstractItemView:enabled
|
||||
{
|
||||
color: #eff0f1;
|
||||
selection-color: #eff0f1;
|
||||
selection-background-color: #3daee9;
|
||||
}
|
||||
|
||||
/* Won't take hover events. */
|
||||
QCalendarWidget QToolButton#qt_calendar_nextmonth
|
||||
{
|
||||
border-image: url(:/dark/calendar_next.svg);
|
||||
width: 0.5em;
|
||||
height: 0.8em;
|
||||
icon-size: 0px;
|
||||
}
|
||||
|
||||
QCalendarWidget QToolButton#qt_calendar_prevmonth
|
||||
{
|
||||
border-image: url(:/dark/calendar_previous.svg);
|
||||
width: 0.5em;
|
||||
height: 0.8em;
|
||||
icon-size: 0px;
|
||||
}
|
||||
|
||||
QCalendarWidget QSpinBox
|
||||
{
|
||||
max-height: 1.5em;
|
||||
min-width: 3.5em;
|
||||
margin: 0em;
|
||||
margin-top: 0.2em;
|
||||
padding: 0em;
|
||||
outline: 0em;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
QLabel
|
||||
{
|
||||
border: 0em solid black;
|
||||
|
|