Skip to content

Commit e145a5d

Browse files
committed
theme ui style
1 parent 25dcbe5 commit e145a5d

File tree

5 files changed

+107
-70
lines changed

5 files changed

+107
-70
lines changed

Resources/Themes/Dark/style.qss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,14 @@ ToolTip > QLabel {
302302
background-color: rgba(230, 230, 230, 255);
303303
}
304304

305-
/*捐赠,更新,错误窗口*/
306-
#widgetDonate, #widgetUpdate, #widgetError {
305+
/*捐赠,更新,错误,主题窗口*/
306+
#widgetDonate, #widgetUpdate, #widgetError, #widgetSkin {
307307
border: 1px solid rgba(200, 200, 200, 255);
308308
border-radius: 4px; /*窗口最外层圆角*/
309309
background: rgba(38, 38, 38, 255); /*背景颜色*/
310310
}
311-
/*捐赠窗口,更新窗口,错误窗口背景*/
312-
#widgetImage, #widgetUpdateBg, #widgetErrorBg {
311+
/*捐赠窗口,更新窗口,错误,主题窗口背景*/
312+
#widgetImage, #widgetUpdateBg, #widgetErrorBg, #widgetSkinBg {
313313
border: 1px solid rgba(200, 200, 200, 255);
314314
border-top: none;
315315
background: rgba(235, 235, 235, 255); /*背景颜色*/

Resources/Themes/Default/style.qss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,14 @@ ToolTip > QLabel {
302302
background-color: rgba(230, 230, 230, 255);
303303
}
304304

305-
/*捐赠,更新,错误窗口*/
306-
#widgetDonate, #widgetUpdate, #widgetError {
305+
/*捐赠,更新,错误,主题窗口*/
306+
#widgetDonate, #widgetUpdate, #widgetError, #widgetSkin {
307307
border: 1px solid rgba(44, 144, 92, 255);
308308
border-radius: 4px; /*窗口最外层圆角*/
309309
background: rgba(64, 187, 107, 255); /*背景颜色*/
310310
}
311-
/*捐赠窗口,更新窗口,错误窗口背景*/
312-
#widgetImage, #widgetUpdateBg, #widgetErrorBg {
311+
/*捐赠窗口,更新窗口,错误,主题窗口背景*/
312+
#widgetImage, #widgetUpdateBg, #widgetErrorBg, #widgetSkinBg {
313313
border: 1px solid rgba(44, 144, 92, 255);
314314
border-top: none;
315315
background: rgba(235, 235, 235, 255); /*背景颜色*/

UiFiles/SkinDialog.ui

Lines changed: 81 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -105,80 +105,107 @@
105105
</widget>
106106
</item>
107107
<item>
108-
<widget class="QTabWidget" name="tabWidget">
109-
<property name="currentIndex">
110-
<number>0</number>
111-
</property>
112-
<widget class="ThemeWidget" name="tabTheme">
113-
<attribute name="title">
114-
<string>Theme</string>
115-
</attribute>
116-
</widget>
117-
<widget class="ColourfulWidget" name="tabColourful">
118-
<attribute name="title">
119-
<string>Colourful</string>
120-
</attribute>
121-
</widget>
122-
<widget class="PictureWidget" name="tabPicture">
123-
<attribute name="title">
124-
<string>Picture</string>
125-
</attribute>
126-
</widget>
127-
</widget>
128-
</item>
129-
<item>
130-
<widget class="QWidget" name="widgetBottom" native="true">
131-
<layout class="QHBoxLayout" name="horizontalLayout_2">
108+
<widget class="QWidget" name="widgetSkinBg" native="true">
109+
<layout class="QVBoxLayout" name="verticalLayout_3">
132110
<property name="spacing">
133-
<number>14</number>
111+
<number>0</number>
134112
</property>
135113
<property name="leftMargin">
136-
<number>30</number>
114+
<number>0</number>
137115
</property>
138116
<property name="topMargin">
139117
<number>0</number>
140118
</property>
141119
<property name="rightMargin">
142-
<number>30</number>
120+
<number>0</number>
143121
</property>
144122
<property name="bottomMargin">
145123
<number>0</number>
146124
</property>
147125
<item>
148-
<widget class="QLabel" name="label">
149-
<property name="text">
150-
<string>Transparency</string>
151-
</property>
152-
</widget>
153-
</item>
154-
<item>
155-
<widget class="QSlider" name="sliderOpacity">
156-
<property name="orientation">
157-
<enum>Qt::Horizontal</enum>
126+
<widget class="QTabWidget" name="tabWidget">
127+
<property name="currentIndex">
128+
<number>0</number>
158129
</property>
130+
<widget class="ThemeWidget" name="tabTheme">
131+
<attribute name="title">
132+
<string>Theme</string>
133+
</attribute>
134+
</widget>
135+
<widget class="ColourfulWidget" name="tabColourful">
136+
<attribute name="title">
137+
<string>Colourful</string>
138+
</attribute>
139+
</widget>
140+
<widget class="PictureWidget" name="tabPicture">
141+
<attribute name="title">
142+
<string>Picture</string>
143+
</attribute>
144+
</widget>
159145
</widget>
160146
</item>
161147
<item>
162-
<spacer name="horizontalSpacer">
163-
<property name="orientation">
164-
<enum>Qt::Horizontal</enum>
165-
</property>
166-
<property name="sizeHint" stdset="0">
148+
<widget class="QWidget" name="widgetBottom" native="true">
149+
<property name="minimumSize">
167150
<size>
168-
<width>40</width>
169-
<height>20</height>
151+
<width>0</width>
152+
<height>64</height>
170153
</size>
171154
</property>
172-
</spacer>
173-
</item>
174-
<item>
175-
<widget class="QPushButton" name="buttonRestore">
176-
<property name="text">
177-
<string>Restore the default theme</string>
178-
</property>
179-
<property name="autoDefault">
180-
<bool>false</bool>
181-
</property>
155+
<layout class="QHBoxLayout" name="horizontalLayout_2">
156+
<property name="spacing">
157+
<number>14</number>
158+
</property>
159+
<property name="leftMargin">
160+
<number>30</number>
161+
</property>
162+
<property name="topMargin">
163+
<number>0</number>
164+
</property>
165+
<property name="rightMargin">
166+
<number>30</number>
167+
</property>
168+
<property name="bottomMargin">
169+
<number>0</number>
170+
</property>
171+
<item>
172+
<widget class="QLabel" name="label">
173+
<property name="text">
174+
<string>Transparency</string>
175+
</property>
176+
</widget>
177+
</item>
178+
<item>
179+
<widget class="QSlider" name="sliderOpacity">
180+
<property name="orientation">
181+
<enum>Qt::Horizontal</enum>
182+
</property>
183+
</widget>
184+
</item>
185+
<item>
186+
<spacer name="horizontalSpacer">
187+
<property name="orientation">
188+
<enum>Qt::Horizontal</enum>
189+
</property>
190+
<property name="sizeHint" stdset="0">
191+
<size>
192+
<width>40</width>
193+
<height>20</height>
194+
</size>
195+
</property>
196+
</spacer>
197+
</item>
198+
<item>
199+
<widget class="QPushButton" name="buttonRestore">
200+
<property name="text">
201+
<string>Restore the default theme</string>
202+
</property>
203+
<property name="autoDefault">
204+
<bool>false</bool>
205+
</property>
206+
</widget>
207+
</item>
208+
</layout>
182209
</widget>
183210
</item>
184211
</layout>

UiFiles/Ui_SkinDialog.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ def setupUi(self, FormSkinDialog):
4141
self.buttonClose.setObjectName("buttonClose")
4242
self.horizontalLayout.addWidget(self.buttonClose)
4343
self.verticalLayout_2.addWidget(self.dialogTitlebar)
44-
self.tabWidget = QtWidgets.QTabWidget(self.widgetSkin)
44+
self.widgetSkinBg = QtWidgets.QWidget(self.widgetSkin)
45+
self.widgetSkinBg.setObjectName("widgetSkinBg")
46+
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.widgetSkinBg)
47+
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
48+
self.verticalLayout_3.setSpacing(0)
49+
self.verticalLayout_3.setObjectName("verticalLayout_3")
50+
self.tabWidget = QtWidgets.QTabWidget(self.widgetSkinBg)
4551
self.tabWidget.setObjectName("tabWidget")
4652
self.tabTheme = ThemeWidget()
4753
self.tabTheme.setObjectName("tabTheme")
@@ -52,8 +58,9 @@ def setupUi(self, FormSkinDialog):
5258
self.tabPicture = PictureWidget()
5359
self.tabPicture.setObjectName("tabPicture")
5460
self.tabWidget.addTab(self.tabPicture, "")
55-
self.verticalLayout_2.addWidget(self.tabWidget)
56-
self.widgetBottom = QtWidgets.QWidget(self.widgetSkin)
61+
self.verticalLayout_3.addWidget(self.tabWidget)
62+
self.widgetBottom = QtWidgets.QWidget(self.widgetSkinBg)
63+
self.widgetBottom.setMinimumSize(QtCore.QSize(0, 64))
5764
self.widgetBottom.setObjectName("widgetBottom")
5865
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.widgetBottom)
5966
self.horizontalLayout_2.setContentsMargins(30, 0, 30, 0)
@@ -72,7 +79,8 @@ def setupUi(self, FormSkinDialog):
7279
self.buttonRestore.setAutoDefault(False)
7380
self.buttonRestore.setObjectName("buttonRestore")
7481
self.horizontalLayout_2.addWidget(self.buttonRestore)
75-
self.verticalLayout_2.addWidget(self.widgetBottom)
82+
self.verticalLayout_3.addWidget(self.widgetBottom)
83+
self.verticalLayout_2.addWidget(self.widgetSkinBg)
7684
self.verticalLayout.addWidget(self.widgetSkin)
7785

7886
self.retranslateUi(FormSkinDialog)

Widgets/Skins/PictureWidget.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@
99
@file: Widgets.Skins.PictureWidget
1010
@description:
1111
"""
12-
from PyQt5.QtWidgets import QWidget
12+
from PyQt5.QtWidgets import QTabWidget
1313

1414

1515
__Author__ = 'Irony'
1616
__Copyright__ = 'Copyright (c) 2019'
1717

1818

19-
class PictureWidget(QWidget):
19+
class PictureWidget(QTabWidget):
2020

2121
def __init__(self, *args, **kwargs):
2222
super(PictureWidget, self).__init__(*args, **kwargs)
23-
23+
2424
def init(self):
25-
pass
25+
"""初始化下载图片
26+
"""
27+
pass

0 commit comments

Comments
 (0)