Merged changes into dark.

- Updated the colors of size grips and move toolbars
- Added tests for toolbars with separators and multiple configurations.
- Fixed horizontal and vertical move and separator icons.
main
Alex Huszagh 2021-07-15 18:27:07 -05:00
parent 2977d1a720
commit feb7dba526
18 changed files with 3192 additions and 5170 deletions

View File

@ -0,0 +1,4 @@
<svg width="16" height="32">
<rect fill="^0^" x="6" y="4" width="1" height="24"/>
<rect fill="^0^" x="14" y="4" width="1" height="24"/>
</svg>

After

Width:  |  Height:  |  Size: 151 B

View File

@ -0,0 +1,3 @@
<svg width="16" height="32">
<rect fill="^0^" x="8" y="4" width="1" height="24"/>
</svg>

After

Width:  |  Height:  |  Size: 93 B

5
assets/sizegrip.svg.in Normal file
View File

@ -0,0 +1,5 @@
<svg width="100" height="100">
<g transform="scale(0.1)">
<path fill="^0^" 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>

After

Width:  |  Height:  |  Size: 276 B

View File

@ -0,0 +1 @@
<svg width="64" height="64"/>

After

Width:  |  Height:  |  Size: 30 B

View File

@ -0,0 +1,4 @@
<svg width="32" height="16">
<rect fill="^0^" x="4" y="6" width="24" height="1"/>
<rect fill="^0^" x="4" y="14" width="24" height="1"/>
</svg>

After

Width:  |  Height:  |  Size: 151 B

View File

@ -0,0 +1,3 @@
<svg width="32" height="16">
<rect fill="^0^" x="4" y="8" width="24" height="1"/>
</svg>

After

Width:  |  Height:  |  Size: 93 B

View File

@ -45,8 +45,8 @@
<file>light/radio_unchecked_disabled.svg</file>
<file>dark/hmovetoolbar.svg</file>
<file>dark/vmovetoolbar.svg</file>
<file>dark/hsepartoolbar.svg</file>
<file>dark/vsepartoolbars.svg</file>
<file>dark/hseptoolbar.svg</file>
<file>dark/vseptoolbar.svg</file>
<file>dark/branch_closed.svg</file>
<file>dark/branch_closed_hover.svg</file>
<file>dark/branch_end.svg</file>
@ -87,7 +87,5 @@
<file>dark/vline.svg</file>
<file>light.qss</file>
<file>dark.qss</file>
<!-- TODO(ahuszagh) Remove -->
<file>windows_dark.qss</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,7 @@ colors_map = {
'close_pressed': '#b33e3e',
'undock': '#a2a2a2',
'tree': '#afafaf',
'toolbar': '#5f5f5f',
},
}
@ -120,6 +121,24 @@ assets = {
'default': ['foreground'],
'hover': ['hover'],
},
'transparent': {
'default': [],
},
'hmovetoolbar': {
'default': ['disabled'],
},
'vmovetoolbar': {
'default': ['disabled'],
},
'hseptoolbar': {
'default': ['disabled'],
},
'vseptoolbar': {
'default': ['disabled'],
},
'sizegrip': {
'default': ['disabled'],
}
}
def replace(contents, colors, color_map):

1393
dark.qss

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
<svg x="0px" y="0px" width="16px" height="64px" viewBox="0 0 16 64" enable-background="new 0 0 16 64" xml:space="preserve">
<rect fill="#5f5f5f" x="2" y="1" width="1" height="62.5"/>
<rect fill="#5f5f5f" x="9" y="1" width="1" height="62.5"/>
<svg width="16" height="32">
<rect fill="#b0b0b0" x="6" y="4" width="1" height="24"/>
<rect fill="#b0b0b0" x="14" y="4" width="1" height="24"/>
</svg>

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 159 B

View File

@ -1,3 +0,0 @@
<svg x="0px" y="0px" width="7px" height="63px" viewBox="0 0 7 63" enable-background="new 0 0 7 63" xml:space="preserve">
<rect fill="#5f5f5f" x="2" y="13" width="1" height="37"/>
</svg>

Before

Width:  |  Height:  |  Size: 188 B

3
dark/hseptoolbar.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="16" height="32">
<rect fill="#b0b0b0" x="8" y="4" width="1" height="24"/>
</svg>

After

Width:  |  Height:  |  Size: 97 B

View File

@ -1,8 +1,4 @@
<svg x="0px" y="0px" width="54px" height="10px" viewBox="0 0 54 10" enable-background="new 0 0 54 10" xml:space="preserve">
<rect id="Dark1" data-name="Dark1" fill="#292c31" x="16" y="1" width="4" height="8"/>
<rect id="Light1" data-name="Light1" fill="#7f8795" x="16" y="1" width="3" height="7"/>
<rect id="Dark2" data-name="Dark2" fill="#292c31" x="25" y="1" width="4" height="8"/>
<rect id="Light2" data-name="Light2" fill="#7f8795" x="25" y="1" width="3" height="7"/>
<rect id="Dark3" data-name="Dark3" fill="#292c31" x="34" y="1" width="4" height="8"/>
<rect id="Light3" data-name="Light3" fill="#7f8795" x="34" y="1" width="3" height="7"/>
<svg width="32" height="16">
<rect fill="#b0b0b0" x="4" y="6" width="24" height="1"/>
<rect fill="#b0b0b0" x="4" y="14" width="24" height="1"/>
</svg>

Before

Width:  |  Height:  |  Size: 665 B

After

Width:  |  Height:  |  Size: 159 B

View File

@ -1,7 +0,0 @@
<svg x="0px" y="0px" width="63px" height="7px" viewBox="0 0 63 7" enable-background="new 0 0 63 7" xml:space="preserve">
<rect id="Dark1" data-name="Dark1" fill="#292c31" x="25" y="1" width="1" height="5"/>
<rect id="Dark2" data-name="Dark2" fill="#292c31" x="38" y="1" width="1" height="5"/>
<rect id="Light1" data-name="Light1" fill="#7f8795" x="23" y="1" width="2" height="5"/>
<rect id="Light2" data-name="Light2" fill="#7f8795" x="30" y="1" width="2" height="5"/>
<rect id="Light3" data-name="Light3" fill="#7f8795" x="36" y="1" width="2" height="5"/>
</svg>

Before

Width:  |  Height:  |  Size: 574 B

3
dark/vseptoolbar.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="32" height="16">
<rect fill="#b0b0b0" x="4" y="8" width="24" height="1"/>
</svg>

After

Width:  |  Height:  |  Size: 97 B

28
test.py
View File

@ -400,15 +400,26 @@ def main(argv=None):
item = QtWidgets.QTableWidgetItem(f'Column {index + 1}')
child.setHorizontalHeaderItem(index, item)
elif args.widget == 'toolbar':
child = QtWidgets.QToolBar('Toolbar')
child.setOrientation(QtCore.Qt.Vertical)
child.setGeometry(QtCore.QRect(0, 0, args.width, int(1.5 * font.pointSize())))
child.addAction('&Action 1')
child.addAction('&Action 2')
child.addAction('&Action 3')
layout_type = None
child = []
toolbar1 = QtWidgets.QToolBar('Toolbar')
toolbar1.addAction('&Action 1')
toolbar1.addAction('&Action 2')
toolbar1.addSeparator()
toolbar1.addAction('&Action 3')
icon = QtGui.QIcon(':/dark/close.svg')
child.addAction(icon, '&Action 4')
window.addToolBar(child)
toolbar1.addAction(icon, '&Action 4')
window.addToolBar(QtCore.Qt.TopToolBarArea, toolbar1)
toolbar2 = QtWidgets.QToolBar('Toolbar')
toolbar2.setOrientation(QtCore.Qt.Vertical)
toolbar2.addAction('&Action 1')
toolbar2.addAction('&Action 2')
toolbar2.addSeparator()
toolbar2.addAction('&Action 3')
icon = QtGui.QIcon(':/dark/close.svg')
toolbar2.addAction(icon, '&Action 4')
window.addToolBar(QtCore.Qt.LeftToolBarArea, toolbar2)
elif args.widget == 'toolbutton':
layout_type = 'horizontal'
child = [
@ -559,6 +570,7 @@ def main(argv=None):
raise NotImplementedError
# Add the widgets to the layout.
if layout_type is not None:
widget_layout = layout[layout_type]()
if args.compress:
widget_layout.addStretch(1)

File diff suppressed because it is too large Load Diff