Updates styles, better configuration.

main
Alex Huszagh 2021-07-14 01:14:04 -05:00
parent 55c738813e
commit e4fdb9fac9
44 changed files with 3123 additions and 2777 deletions

View File

@ -5,6 +5,12 @@ Breeze and BreezeDark-like stylesheets for Qt Applications.
This stylesheet aims to be similar across all platforms, and provide a nice UI for different font sizes. This is currently under work for scaling to multiple different DPIs and font sizes.
The current status of the migration is:
- Change all `ex` widths to `em`
- Ensure individual tests for all widgets ☐
- Port all the changes made to the dark stylesheet to light ☐
C++ Installation
================
@ -84,6 +90,11 @@ Example user interface using the Breeze and BreezeDark stylesheets side-by-side.
![BreezeDark](/assets/Breeze.gif)
Development
===========
To configure the assets and the stylesheets, run `configure.py`. To compile the assets and stylesheets for Python, run `pyrcc5 breeze.qrc -o breeze_resources.py`.
Acknowledgements
================

7
assets/checkbox_checked.svg.in Executable file
View File

@ -0,0 +1,7 @@
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="^0^"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="^0^"/>
<path d="M5,5 h8 v8 h-8 v-8 z" fill="^0^" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 263 B

View File

@ -0,0 +1,9 @@
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="^0^"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="^0^"/>
<path d="M5,5 h8 v8 h-0.9 v-7.1 h-7.1 z" fill="^0^" fill-rule="evenodd"/>
<path d="M13,13 h-8 v-8 h0.9 v7.1 h7.1 z" fill="^0^" fill-rule="evenodd"/>
<path d="M13,5 L 5,13 v-8 h8 z" fill="^0^" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 421 B

View File

@ -0,0 +1,6 @@
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="^0^"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="^0^"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 195 B

5
assets/close.svg.in Executable file
View File

@ -0,0 +1,5 @@
<svg width="120" height="120">
<g transform="scale(0.1)">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="^0^"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 562 B

5
assets/down_arrow.svg.in Executable file
View File

@ -0,0 +1,5 @@
<svg width="90" height="60">
<g transform="scale(10)">
<path d="M 1.1894592,0.91769718 4.5,4.2280182 7.8105408,0.91627648 c 0.1577125,-0.157702 0.4134624,-0.157702 0.5711749,0 0.1577124,0.15770202 0.1577124,0.41343492 0,0.57113692 l -3.5961283,3.5973102 0,0 0,0 c -0.1577124,0.1577019 -0.4134624,0.1577019 -0.5711748,0 L 0.6182843,1.4874134 c -0.1577124,-0.157702 -0.1577124,-0.4134349 0,-0.57113692 0.1577125,-0.15628131 0.4134624,-0.15628131 0.5711749,0.00142 z" fill="^0^"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 498 B

5
assets/left_arrow.svg.in Executable file
View File

@ -0,0 +1,5 @@
<svg width="60" 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

7
assets/radio_checked.svg.in Executable file
View File

@ -0,0 +1,7 @@
<svg width="100" height="100">
<g transform="scale(5)">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="^0^" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 362 B

6
assets/radio_unchecked.svg.in Executable file
View File

@ -0,0 +1,6 @@
<svg width="100" height="100">
<g transform="scale(5)">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="^0^" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 278 B

5
assets/right_arrow.svg.in Executable file
View File

@ -0,0 +1,5 @@
<svg width="60" 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

5
assets/undock.svg.in Executable file
View File

@ -0,0 +1,5 @@
<svg width="100" height="100" >
<g transform="scale(0.1)">
<path d="M250,500 L 500,750 L 750,500 L 500,250 z" fill="none" stroke="^0^" stroke-width="50" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 176 B

7
assets/undock_hover.svg.in Executable file
View File

@ -0,0 +1,7 @@
<svg width="100" height="100" >
<g transform="scale(0.1)">
<path id="BottomCircle" d="M100,500 a250,250, 0, 1,0, 800,0 M775,500 L500,775 L225,500 z" fill="^0^" />
<path id="TopCircle" d="M900,500 a250,250, 0, 1,0, -800,0 M225,500 L500,225 L775,500 z" fill="^0^" />
<path id="Inside" d="M275,500 L 500,725 L 725,500 L 500,275 z" fill="^0^" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 371 B

5
assets/up_arrow.svg.in Executable file
View File

@ -0,0 +1,5 @@
<svg width="90" height="60">
<g transform="scale(10)">
<path d="M 1.1894592,5.0833028 4.5,1.7729818 7.8105408,5.0847235 c 0.1577125,0.157702 0.4134624,0.157702 0.5711749,0 0.1577124,-0.157702 0.1577124,-0.4134349 0,-0.5711369 l -3.5961283,-3.59731019 0,0 0,0 c -0.1577124,-0.1577019 -0.4134624,-0.1577019 -0.5711748,0 L 0.6182843,4.5135866 c -0.1577124,0.157702 -0.1577124,0.4134349 0,0.5711369 0.1577125,0.1562813 0.4134624,0.1562813 0.5711749,-0.00142 z" fill="^0^"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 490 B

View File

@ -51,21 +51,21 @@
<file>dark/branch_open.svg</file>
<file>dark/down_arrow.svg</file>
<file>dark/down_arrow_disabled.svg</file>
<file>dark/down_arrow-hover.svg</file>
<file>dark/down_arrow_hover.svg</file>
<file>dark/left_arrow.svg</file>
<file>dark/left_arrow_disabled.svg</file>
<file>dark/right_arrow.svg</file>
<file>dark/right_arrow_disabled.svg</file>
<file>dark/up_arrow.svg</file>
<file>dark/up_arrow_disabled.svg</file>
<file>dark/up_arrow-hover.svg</file>
<file>dark/up_arrow_hover.svg</file>
<file>dark/sizegrip.svg</file>
<file>dark/transparent.svg</file>
<file>dark/close.svg</file>
<file>dark/close-hover.svg</file>
<file>dark/close-pressed.svg</file>
<file>dark/close_hover.svg</file>
<file>dark/close_pressed.svg</file>
<file>dark/undock.svg</file>
<file>dark/undock-hover.svg</file>
<file>dark/undock_hover.svg</file>
<file>dark/checkbox_checked.svg</file>
<file>dark/checkbox_checked_disabled.svg</file>
<file>dark/checkbox_indeterminate.svg</file>

File diff suppressed because it is too large Load Diff

119
configure.py Normal file
View File

@ -0,0 +1,119 @@
'''
configure
=========
Configure the assets and stylesheets.
'''
import glob
import os
home = os.path.dirname(os.path.realpath(__file__))
# TODO(ahuszagh) Need configure for the stylesheets.
# TODO(ahuszagh) Need configure for the assets.
# TODO(ahuszagh) Need a script to generate the qrc
# Should be easy: styles.qss + assets.
# Assets should be easy.
colors_map = {
'light': {},
'dark': {
'foreground': '#eff0f1',
'background': '#31363b',
'hover': '#3daee9',
'hover_light': '#58d3ff',
# Going to need more than 1 disabled.
'disabled': '#b0b0b0',
'disabled_light': '#c8c9ca',
# Single-use colors.
'close': '#626568',
'close_hover': '#b37979',
'close_pressed': '#b33e3e',
'undock': '#a2a2a2',
},
}
assets = {
# Arrows
'down_arrow': {
'default': ['foreground'],
'hover': ['hover'],
'disabled': ['disabled'],
},
'left_arrow': {
'default': ['foreground'],
'disabled': ['disabled'],
},
'right_arrow': {
'default': ['foreground'],
'disabled': ['disabled'],
},
'up_arrow': {
'default': ['foreground'],
'hover': ['hover'],
'disabled': ['disabled'],
},
# Abstract buttons.
'checkbox_checked': {
'default': ['hover_light'],
'disabled': ['disabled_light'],
},
'checkbox_indeterminate': {
'default': ['hover_light'],
'disabled': ['disabled_light'],
},
'checkbox_unchecked': {
'default': ['hover_light'],
'disabled': ['disabled_light'],
},
'radio_checked': {
'default': ['hover_light'],
'disabled': ['disabled_light'],
},
'radio_unchecked': {
'default': ['hover_light'],
'disabled': ['disabled_light'],
},
# Dock/Tab widgets
'close': {
'default': ['close'],
'hover': ['close_hover'],
'pressed': ['close_pressed'],
},
'undock': {
'default': ['undock'],
},
'undock_hover': {
'default': ['undock'],
},
# TODO(ahuszagh) Add more widgets here...
}
def replace(contents, colors, color_map):
'''Replace all template values.'''
for index, color in enumerate(colors):
sub = f'^{index}^'
contents = contents.replace(sub, color_map[color])
return contents
def configure(style):
'''Configure for a given style.'''
color_map = colors_map[style]
for base_image, extensions in assets.items():
template = f'{home}/assets/{base_image}.svg.in'
template_contents = open(template).read()
for extension, colors in extensions.items():
contents = replace(template_contents, colors, color_map)
if extension == 'default':
filename = f'{home}/{style}/{base_image}.svg'
else:
filename = f'{home}/{style}/{base_image}_{extension}.svg'
with open(filename, 'w') as file:
file.write(contents)
if __name__ == '__main__':
configure('dark')
#configure('light')

View File

@ -875,7 +875,7 @@ QTabBar::close-button
QTabBar::close-button:hover
{
border-image: url(:/dark/close-hover.svg);
border-image: url(:/dark/close_hover.svg);
width: 1.2ex;
height: 1.2ex;
background: transparent;
@ -883,7 +883,7 @@ QTabBar::close-button:hover
QTabBar::close-button:pressed
{
border-image: url(:/dark/close-pressed.svg);
border-image: url(:/dark/close_pressed.svg);
width: 1.2ex;
height: 1.2ex;
background: transparent;
@ -1159,7 +1159,7 @@ QDockWidget::float-button
QDockWidget::float-button:hover
{
border-image: url(:/dark/undock-hover.svg) ;
border-image: url(:/dark/undock_hover.svg) ;
}
QDockWidget::close-button
@ -1169,12 +1169,12 @@ QDockWidget::close-button
QDockWidget::close-button:hover
{
border-image: url(:/dark/close-hover.svg) ;
border-image: url(:/dark/close_hover.svg) ;
}
QDockWidget::close-button:pressed
{
border-image: url(:/dark/close-pressed.svg) ;
border-image: url(:/dark/close_pressed.svg) ;
}
QTreeView,
@ -1595,7 +1595,7 @@ QSpinBox::up-arrow:pressed,
QDoubleSpinBox::up-arrow:hover,
QDoubleSpinBox::up-arrow:pressed
{
border-image: url(:/dark/up_arrow-hover.svg);
border-image: url(:/dark/up_arrow_hover.svg);
width: 0.9ex;
height: 0.6ex;
}
@ -1631,7 +1631,7 @@ QSpinBox::down-arrow:pressed,
QDoubleSpinBox::down-arrow:hover,
QDoubleSpinBox::down-arrow:pressed
{
border-image: url(:/dark/down_arrow-hover.svg);
border-image: url(:/dark/down_arrow_hover.svg);
width: 0.9ex;
height: 0.6ex;
}

View File

@ -1,5 +1,7 @@
<svg x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#58d3ff"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#58d3ff"/>
<path d="M5,5 h8 v8 h-8 v-8 z" fill="#58d3ff" fill-rule="evenodd"/>
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#58d3ff"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#58d3ff"/>
<path d="M5,5 h8 v8 h-8 v-8 z" fill="#58d3ff" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 330 B

After

Width:  |  Height:  |  Size: 275 B

View File

@ -1,5 +1,7 @@
<svg x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#c8c9ca"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#c8c9ca"/>
<path d="M5,5 h8 v8 h-8 v-8 z" fill="#c8c9ca" fill-rule="evenodd"/>
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#c8c9ca"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#c8c9ca"/>
<path d="M5,5 h8 v8 h-8 v-8 z" fill="#c8c9ca" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 330 B

After

Width:  |  Height:  |  Size: 275 B

View File

@ -1,7 +1,9 @@
<svg x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#58d3ff"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#58d3ff"/>
<path d="M5,5 h8 v8 h-0.9 v-7.1 h-7.1 z" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M13,13 h-8 v-8 h0.9 v7.1 h7.1 z" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M13,5 L 5,13 v-8 h8 z" fill="#58d3ff" fill-rule="evenodd"/>
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#58d3ff"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#58d3ff"/>
<path d="M5,5 h8 v8 h-0.9 v-7.1 h-7.1 z" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M13,13 h-8 v-8 h0.9 v7.1 h7.1 z" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M13,5 L 5,13 v-8 h8 z" fill="#58d3ff" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 441 B

View File

@ -1,7 +1,9 @@
<svg x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#c8c9ca"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#c8c9ca"/>
<path d="M5,5 h8 v8 h-0.9 v-7.1 h-7.1 z" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M13,13 h-8 v-8 h0.9 v7.1 h7.1 z" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M13,5 L 5,13 v-8 h8 z" fill="#c8c9ca" fill-rule="evenodd"/>
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#c8c9ca"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#c8c9ca"/>
<path d="M5,5 h8 v8 h-0.9 v-7.1 h-7.1 z" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M13,13 h-8 v-8 h0.9 v7.1 h7.1 z" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M13,5 L 5,13 v-8 h8 z" fill="#c8c9ca" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 441 B

View File

@ -1,4 +1,6 @@
<svg x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#58d3ff"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#58d3ff"/>
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#58d3ff"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#58d3ff"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 203 B

View File

@ -1,4 +1,6 @@
<svg x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#c8c9ca"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#c8c9ca"/>
<svg width="90" height="90">
<g transform="scale(5)">
<path d="M2,2 h14 v14 h-0.9 v-13.1 h-13.1 z" fill="#c8c9ca"/>
<path d="M16,16 h-14 v-14 h0.9 v13.1 h13.1 z" fill="#c8c9ca"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 203 B

View File

@ -1,3 +0,0 @@
<svg width="1200" height="1200">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="#b37979"/>
</svg>

Before

Width:  |  Height:  |  Size: 530 B

View File

@ -1,3 +0,0 @@
<svg width="1200" height="1200">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="#b33e3e"/>
</svg>

Before

Width:  |  Height:  |  Size: 530 B

View File

@ -1,3 +1,5 @@
<svg width="1200" height="1200">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="#626568"/>
<svg width="120" height="120">
<g transform="scale(0.1)">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="#626568"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 530 B

After

Width:  |  Height:  |  Size: 566 B

5
dark/close_hover.svg Normal file
View File

@ -0,0 +1,5 @@
<svg width="120" height="120">
<g transform="scale(0.1)">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="#b37979"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 566 B

5
dark/close_pressed.svg Normal file
View File

@ -0,0 +1,5 @@
<svg width="120" height="120">
<g transform="scale(0.1)">
<path d="M 600,1050 C 351.472,1050 150,848.528 150,600 150,351.472 351.472,150 600,150 c 248.528,0 450,201.472 450,450 0,248.528 -201.472,450 -450,450 z M 888.462,827.851 661.974,601.122 l 0,-2.244 226.488,-226.729 0,-60.611 -60.848,0 Q 727.339,411.986 627.043,512.451 613.524,525.358 600,538.267 l -226.487,-226.729 -61.975,0 0,60.611 L 538.026,600 311.538,826.729 l 0,61.733 60.848,0 q 34.363,-34.792 68.735,-69.59 L 600,661.733 l 226.487,226.729 61.975,0 0,-60.611 z" fill="#b33e3e"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 566 B

View File

@ -1,5 +1,5 @@
<svg width="90" height="60">
<g transform="scale(10)">
<path d="M 1.1894592,0.91769718 4.5,4.2280182 7.8105408,0.91627648 c 0.1577125,-0.157702 0.4134624,-0.157702 0.5711749,0 0.1577124,0.15770202 0.1577124,0.41343492 0,0.57113692 l -3.5961283,3.5973102 0,0 0,0 c -0.1577124,0.1577019 -0.4134624,0.1577019 -0.5711748,0 L 0.6182843,1.4874134 c -0.1577124,-0.157702 -0.1577124,-0.4134349 0,-0.57113692 0.1577125,-0.15628131 0.4134624,-0.15628131 0.5711749,0.00142 z" fill="#fff"/>
<path d="M 1.1894592,0.91769718 4.5,4.2280182 7.8105408,0.91627648 c 0.1577125,-0.157702 0.4134624,-0.157702 0.5711749,0 0.1577124,0.15770202 0.1577124,0.41343492 0,0.57113692 l -3.5961283,3.5973102 0,0 0,0 c -0.1577124,0.1577019 -0.4134624,0.1577019 -0.5711748,0 L 0.6182843,1.4874134 c -0.1577124,-0.157702 -0.1577124,-0.4134349 0,-0.57113692 0.1577125,-0.15628131 0.4134624,-0.15628131 0.5711749,0.00142 z" fill="#eff0f1"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 502 B

View File

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

View File

@ -1,5 +1,5 @@
<svg width="60" 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="#fff"/>
<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>

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 505 B

View File

@ -1,5 +1,7 @@
<svg x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="#58d3ff" fill-rule="evenodd"/>
<svg width="100" height="100">
<g transform="scale(5)">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="#58d3ff" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 374 B

View File

@ -1,5 +1,7 @@
<svg x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="#c8c9ca" fill-rule="evenodd"/>
<svg width="100" height="100">
<g transform="scale(5)">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0" fill="#c8c9ca" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 374 B

View File

@ -1,4 +1,6 @@
<svg x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<svg width="100" height="100">
<g transform="scale(5)">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#58d3ff" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 341 B

After

Width:  |  Height:  |  Size: 286 B

View File

@ -1,4 +1,6 @@
<svg x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<svg width="100" height="100">
<g transform="scale(5)">
<path d="M1,10a9,9 0 1,0 18,0 h-0.9 a8.1,8.1 0 1,1 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
<path d="M1,10a9,9 0 1,1 18,0 h-0.9 a8.1,8.1 0 1,0 -16.2,0 h-0.9" fill="#c8c9ca" fill-rule="evenodd"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 341 B

After

Width:  |  Height:  |  Size: 286 B

View File

@ -1,5 +1,5 @@
<svg width="60" 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="#fff"/>
<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>

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 502 B

View File

@ -1,3 +1,5 @@
<svg width="1000" height="1000">
<path fill="#b0b0b0" d="M22.1,1022.1L-22.1,977.9l1000-1000L1022.1,22.1Zm220,30L197.9,1007.9l1000-1000L1242.1,52.1Zm250,0L447.9,1007.9l1000-1000L1492.1,52.1Zm250,0L697.9,1007.9l1030-1030L1772.1,22.1Z"/>
<svg width="100" height="100">
<g transform="scale(0.1)">
<path fill="#b0b0b0" d="M22.1,1022.1L-22.1,977.9l1000-1000L1022.1,22.1Zm220,30L197.9,1007.9l1000-1000L1242.1,52.1Zm250,0L447.9,1007.9l1000-1000L1492.1,52.1Zm250,0L697.9,1007.9l1030-1030L1772.1,22.1Z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 280 B

View File

@ -1,5 +0,0 @@
<svg width="1000" height="1000" >
<path id="BottomCircle" d="M100,500 a250,250, 0, 1,0, 800,0 M775,500 L500,775 L225,500 z" fill="#a2a2a2" />
<path id="TopCircle" d="M900,500 a250,250, 0, 1,0, -800,0 M225,500 L500,225 L775,500 z" fill="#a2a2a2" />
<path id="Inside" d="M275,500 L 500,725 L 725,500 L 500,275 z" fill="#a2a2a2" />
</svg>

Before

Width:  |  Height:  |  Size: 343 B

View File

@ -1,3 +1,5 @@
<svg width="1000" height="1000" >
<path d="M250,500 L 500,750 L 750,500 L 500,250 z" fill="none" stroke="#a2a2a2" stroke-width="50" />
<svg width="100" height="100" >
<g transform="scale(0.1)">
<path d="M250,500 L 500,750 L 750,500 L 500,250 z" fill="none" stroke="#a2a2a2" stroke-width="50" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 180 B

7
dark/undock_hover.svg Normal file
View File

@ -0,0 +1,7 @@
<svg width="100" height="100" >
<g transform="scale(0.1)">
<path id="BottomCircle" d="M100,500 a250,250, 0, 1,0, 800,0 M775,500 L500,775 L225,500 z" fill="#a2a2a2" />
<path id="TopCircle" d="M900,500 a250,250, 0, 1,0, -800,0 M225,500 L500,225 L775,500 z" fill="#a2a2a2" />
<path id="Inside" d="M275,500 L 500,725 L 725,500 L 500,275 z" fill="#a2a2a2" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 383 B

View File

@ -1,5 +1,5 @@
<svg width="90" height="60">
<g transform="scale(10)">
<path d="M 1.1894592,5.0833028 4.5,1.7729818 7.8105408,5.0847235 c 0.1577125,0.157702 0.4134624,0.157702 0.5711749,0 0.1577124,-0.157702 0.1577124,-0.4134349 0,-0.5711369 l -3.5961283,-3.59731019 0,0 0,0 c -0.1577124,-0.1577019 -0.4134624,-0.1577019 -0.5711748,0 L 0.6182843,4.5135866 c -0.1577124,0.157702 -0.1577124,0.4134349 0,0.5711369 0.1577125,0.1562813 0.4134624,0.1562813 0.5711749,-0.00142 z" fill="#fff"/>
<path d="M 1.1894592,5.0833028 4.5,1.7729818 7.8105408,5.0847235 c 0.1577125,0.157702 0.4134624,0.157702 0.5711749,0 0.1577124,-0.157702 0.1577124,-0.4134349 0,-0.5711369 l -3.5961283,-3.59731019 0,0 0,0 c -0.1577124,-0.1577019 -0.4134624,-0.1577019 -0.5711748,0 L 0.6182843,4.5135866 c -0.1577124,0.157702 -0.1577124,0.4134349 0,0.5711369 0.1577125,0.1562813 0.4134624,0.1562813 0.5711749,-0.00142 z" fill="#eff0f1"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 494 B

View File

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 494 B

View File

@ -93,6 +93,34 @@ alignment = {
'center': QtCore.Qt.AlignCenter,
}
def add_widgets(layout, children):
'''Add 1 or more widgets to the layout.'''
if isinstance(children, list):
for child in children:
layout.addWidget(child)
else:
layout.addWidget(children)
def abstract_button(
cls,
parent=None,
exlusive=False,
checked=False,
enabled=True,
):
'''Helper to simplify creating abstract buttons.'''
inst = cls(parent)
inst.setAutoExclusive(exlusive)
if isinstance(checked, bool):
inst.setChecked(checked)
else:
inst.setTristate(True)
inst.setCheckState(checked)
inst.setEnabled(enabled)
return inst
def main(argv=None):
'Application entry point'
@ -169,14 +197,63 @@ def main(argv=None):
child = QtWidgets.QComboBox(widget)
child.addItem('Item 1')
child.addItem('Item 2')
elif args.widget == 'tab_widget':
child = QtWidgets.QTabWidget(widget)
child.addTab(QtWidgets.QWidget(), 'Tab 1')
child.addTab(QtWidgets.QWidget(), 'Tab 2')
child.addTab(QtWidgets.QWidget(), 'Tab 3')
elif args.widget == 'closable_tab_widget':
child = QtWidgets.QTabWidget(widget)
child.setTabPosition(QtWidgets.QTabWidget.East)
child.setTabsClosable(True)
child.addTab(QtWidgets.QWidget(), 'Tab 1')
child.addTab(QtWidgets.QWidget(), 'Tab 2')
child.addTab(QtWidgets.QWidget(), 'Tab 3')
elif args.widget == 'dock':
child = [
QtWidgets.QDockWidget(window),
QtWidgets.QDockWidget(window),
]
elif args.widget == 'radio':
child = []
child.append(abstract_button(QtWidgets.QRadioButton, widget))
child.append(abstract_button(QtWidgets.QRadioButton, widget, checked=True))
child.append(abstract_button(QtWidgets.QRadioButton, widget, enabled=False))
child.append(abstract_button(QtWidgets.QRadioButton, widget, checked=True, enabled=False))
elif args.widget == 'checkbox':
child = []
child.append(abstract_button(QtWidgets.QCheckBox, widget))
child.append(abstract_button(QtWidgets.QCheckBox, widget, checked=True))
child.append(abstract_button(QtWidgets.QCheckBox, widget, checked=QtCore.Qt.PartiallyChecked))
child.append(abstract_button(QtWidgets.QCheckBox, widget, enabled=False))
child.append(abstract_button(QtWidgets.QCheckBox, widget, checked=True, enabled=False))
child.append(abstract_button(QtWidgets.QCheckBox, widget, checked=QtCore.Qt.PartiallyChecked, enabled=False))
elif args.widget == 'menu_checkbox':
child = QtWidgets.QMenuBar(window)
child.setGeometry(QtCore.QRect(0, 0, args.width, int(1.5 * font.pointSize())))
menu = QtWidgets.QMenu('Main Menu', child)
action1 = QtWidgets.QAction('&Action 1', window)
action1.setCheckable(True)
menu.addAction(action1)
action2 = QtWidgets.QAction('&Action 2', window)
action2.setCheckable(True)
action2.setChecked(True)
menu.addAction(action2)
submenu = QtWidgets.QMenu('Sub Menu', menu)
action3 = QtWidgets.QAction('&Action 3', window)
action3.setCheckable(True)
submenu.addAction(action3)
menu.addAction(submenu.menuAction())
child.addAction(menu.menuAction())
window.setMenuBar(child)
widget_layout = layout[layout_type](widget)
if args.compress:
widget_layout.addStretch(1)
widget_layout.addWidget(child)
add_widgets(widget_layout, child)
widget_layout.addStretch(1)
else:
widget_layout.addWidget(child)
add_widgets(widget_layout, child)
if args.alignment is not None:
widget_layout.setAlignment(alignment[args.alignment])
window.setCentralWidget(widget)

File diff suppressed because it is too large Load Diff