Release 2.8.17
@ -219,11 +219,11 @@ self.main.pushButton.setProperty('class', 'big_button')
|
||||
A window with almost all widgets (see the previous screenshots) are available to test all themes and **create new ones**.
|
||||
|
||||
|
||||
```
|
||||
```python
|
||||
git clone https://github.com/UN-GCPDS/qt-material.git
|
||||
cd qt-material
|
||||
python setup.py install
|
||||
cd examples/full_features
|
||||
cd test
|
||||
python main.py --pyside6
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 959 KiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.0 MiB |
@ -196,7 +196,7 @@ There is an ``extra`` argument for accent colors and custom fonts.
|
||||
'success': '#17a2b8',
|
||||
|
||||
# Font
|
||||
'font-family': 'Roboto',
|
||||
'font_family': 'Roboto',
|
||||
}
|
||||
|
||||
apply_stylesheet(app, 'light_cyan.xml', invert_secondary=True, extra=extra)
|
||||
|
@ -175,11 +175,15 @@ if __name__ == "__main__":
|
||||
pixmap.save(os.path.join('screenshots', f'{theme}.png'))
|
||||
print(f'Saving {theme}')
|
||||
|
||||
try:
|
||||
if len(sys.argv) > 2:
|
||||
theme = sys.argv[2]
|
||||
QTimer.singleShot(T0, take_screenshot)
|
||||
QTimer.singleShot(T0 * 2, app.closeAllWindows)
|
||||
except:
|
||||
try:
|
||||
QTimer.singleShot(T0, take_screenshot)
|
||||
QTimer.singleShot(T0 * 2, app.closeAllWindows)
|
||||
except:
|
||||
QTimer.single_shot(T0, take_screenshot)
|
||||
QTimer.single_shot(T0 * 2, app.closeAllWindows)
|
||||
else:
|
||||
theme = 'default'
|
||||
|
||||
# Set theme on in itialization
|
||||
@ -189,7 +193,11 @@ if __name__ == "__main__":
|
||||
extra=extra)
|
||||
|
||||
frame = RuntimeStylesheets()
|
||||
frame.main.show()
|
||||
|
||||
try:
|
||||
frame.main.showMaximized()
|
||||
except:
|
||||
frame.main.show_maximized()
|
||||
|
||||
if hasattr(app, 'exec'):
|
||||
app.exec()
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1318</width>
|
||||
<width>1501</width>
|
||||
<height>806</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -21,7 +21,7 @@
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_11">
|
||||
<attribute name="title">
|
||||
@ -835,7 +835,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="tabsClosable">
|
||||
<bool>true</bool>
|
||||
@ -1808,8 +1808,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>446</width>
|
||||
<height>266</height>
|
||||
<width>96</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@ -1832,7 +1832,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>425</width>
|
||||
<width>404</width>
|
||||
<height>328</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -1878,7 +1878,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>425</width>
|
||||
<width>608</width>
|
||||
<height>408</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -2527,7 +2527,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1318</width>
|
||||
<width>1501</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -2722,7 +2722,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
</action>
|
||||
<action name="actionsubmenu">
|
||||
<property name="icon">
|
||||
<iconset theme="document-new"/>
|
||||
<iconset theme="document-new">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New...</string>
|
||||
@ -2730,7 +2731,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
</action>
|
||||
<action name="actionsubmenu_2">
|
||||
<property name="icon">
|
||||
<iconset theme="folder"/>
|
||||
<iconset theme="folder">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
@ -2738,7 +2740,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
</action>
|
||||
<action name="actionsubmenu_3">
|
||||
<property name="icon">
|
||||
<iconset theme="document-save-as"/>
|
||||
<iconset theme="document-save-as">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save as...</string>
|
||||
@ -2746,7 +2749,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
</action>
|
||||
<action name="actionsubmenu_4">
|
||||
<property name="icon">
|
||||
<iconset theme="document-save"/>
|
||||
<iconset theme="document-save">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
@ -2759,7 +2763,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
</action>
|
||||
<action name="actionClose">
|
||||
<property name="icon">
|
||||
<iconset theme="window-close"/>
|
||||
<iconset theme="window-close">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
<resources>
|
||||
<color name="primaryColor">#00ff00</color>
|
||||
<color name="primaryLightColor">#6effe8</color>
|
||||
<color name="secondaryColor">#232629</color>
|
||||
<color name="secondaryLightColor">#4f5b62</color>
|
||||
<color name="secondaryDarkColor">#31363b</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#ffffff</color>
|
||||
<color name="primaryColor">#ff4081</color>
|
||||
<color name="primaryLightColor">#ff79b0</color>
|
||||
<color name="secondaryColor">#f5f5f5</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#3c3c3c</color>
|
||||
<color name="secondaryTextColor">#555555</color>
|
||||
</resources>
|
||||
|
Before Width: | Height: | Size: 959 KiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 172 KiB |
@ -229,7 +229,10 @@ def apply_stylesheet(app, theme='', style=None, save_as=None, invert_secondary=F
|
||||
with open(save_as, 'w') as file:
|
||||
file.writelines(stylesheet)
|
||||
|
||||
return app.setStyleSheet(stylesheet)
|
||||
try:
|
||||
app.setStyleSheet(stylesheet)
|
||||
except:
|
||||
app.style_sheet = stylesheet
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
@ -254,11 +257,11 @@ def density(value, density_scale, border=0, scale=1, density_interval=4):
|
||||
if isinstance(value, str):
|
||||
value = float(value.replace('px', ''))
|
||||
|
||||
density = (value + (density_interval * int(density_scale))
|
||||
- (border * 2)) * scale
|
||||
density = (value + (density_interval * int(density_scale)) -
|
||||
(border * 2)) * scale
|
||||
|
||||
# if density < 4:
|
||||
# density = 4
|
||||
if density < 0:
|
||||
density = 0
|
||||
return density
|
||||
|
||||
|
||||
|