Skip to content

Commit b921378

Browse files
committed
[themes] Adjust Night Mapping and Blend of Gray to improve display on windows
Fixes the combo box drop down list clipping text, as well as the spinbox's up and down arrow. Turns out having a single theme QSS that looks great across platforms isn't straightforward.
1 parent d59a346 commit b921378

File tree

2 files changed

+41
-33
lines changed

2 files changed

+41
-33
lines changed

resources/themes/Blend of Gray/style.qss

+20-16
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ QMenuBar::item:pressed
4646
}
4747

4848
QAbstractSpinBox {
49-
padding: 0.1em 0em 0.1em 0.1em;
49+
padding: 0.12em 0em 0.12em 0.12em;
5050
border: 1px solid #222;
5151
border-radius: 0.2em;
5252
background-color: @darkgradient;
@@ -56,10 +56,10 @@ QAbstractSpinBox {
5656
QAbstractSpinBox::up-button {
5757
subcontrol-origin: border;
5858
subcontrol-position: top right;
59-
padding-top:-0.2em;
59+
padding-top:0em;
6060
padding-right:0.05em;
6161
width: 0.8em;
62-
height: 1.2em;
62+
height: 0.8em;
6363
image: url(@theme_path/icons/arrow-up.svg);
6464
}
6565

@@ -69,7 +69,7 @@ QAbstractSpinBox::down-button {
6969
padding-top:0.2em;
7070
padding-right:0.05em;
7171
width: 0.8em;
72-
height: 1.2em;
72+
height: 0.8em;
7373
image: url(@theme_path/icons/arrow-down.svg);
7474
}
7575

@@ -114,7 +114,7 @@ QWidget:disabled
114114

115115
QLineEdit, QTextEdit, QPlainTextEdit
116116
{
117-
padding: 0.1em;
117+
padding: 0.12em;
118118
border-width: 1px;
119119
border-color: @itemdarkbackground;
120120
border-style: solid;
@@ -125,7 +125,7 @@ QLineEdit, QTextEdit, QPlainTextEdit
125125

126126
QPushButton
127127
{
128-
padding: 0.1em;
128+
padding: 0.12em;
129129
border-width: 1px;
130130
border-color: @itemdarkbackground;
131131
border-style: solid;
@@ -136,7 +136,7 @@ QPushButton
136136

137137
QToolButton
138138
{
139-
padding: 0.1em;
139+
padding: 0.12em;
140140
border-width: 1px;
141141
border-color: @itemdarkbackground;
142142
border-style: solid;
@@ -190,7 +190,7 @@ QComboBox {
190190
border-style: solid;
191191
border: 1px solid #1e1e1e;
192192
border-radius: 0.2em;
193-
padding: 0.1em 1em 0.1em 0.1em;
193+
padding: 0.12em 1.2em 0.12em 0.12em;
194194
}
195195

196196

@@ -199,7 +199,7 @@ QComboBox:hover,QPushButton:hover,QToolButton:hover,QAbstractSpinBox:hover {
199199
}
200200

201201
QComboBox:on {
202-
padding: 0.1em;
202+
padding: 0.12em;
203203
padding-left: 0.2em;
204204
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
205205
stop: 0 #555,
@@ -221,7 +221,7 @@ QComboBox:editable QLineEdit {
221221
QComboBox QAbstractItemView, QComboBox QListView {
222222
border: none;
223223
border-radius: 0;
224-
padding: 0.1em;
224+
padding: 0.12em;
225225
background: @itemdarkbackground;
226226
color: @itembackground;
227227
selection-background-color: @selection;
@@ -242,16 +242,16 @@ QComboBox::down-arrow
242242
}
243243

244244
QComboBox:item {
245-
padding-left: 1.5em;
246-
height:1.2em;
245+
padding-left: 1.3em;
246+
height:1.25em;
247247
}
248248
QComboBox:item:selected {
249-
padding-left: 1.5em;
250-
height:1.2em;
249+
padding-left: 1.3em;
250+
height:1.25em;
251251
}
252252
QComboBox:item:checked {
253-
padding-left: 1.5em;
254-
height:1.2em;
253+
padding-left: 1.3em;
254+
height:1.25em;
255255
}
256256

257257
QLineEdit:focus
@@ -426,6 +426,10 @@ QProgressBar::chunk
426426
margin: 1px;
427427
}
428428

429+
QTabWidget::pane {
430+
border: 1px solid @itemdarkbackground;
431+
}
432+
429433
QTabBar::tab {
430434
color: @text;
431435
border: 1px solid @itemdarkbackground;

resources/themes/Night Mapping/style.qss

+21-17
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ QMenuBar::item:pressed
4646
}
4747

4848
QAbstractSpinBox {
49-
padding: 0.1em 0em 0.1em 0.1em;
49+
padding: 0.12em 0em 0.12em 0.12em;
5050
border: 1px solid #222;
5151
border-radius:0px;
5252
background-color: @darkgradient;
@@ -56,10 +56,10 @@ QAbstractSpinBox {
5656
QAbstractSpinBox::up-button {
5757
subcontrol-origin: border;
5858
subcontrol-position: top right;
59-
padding-top:-0.2em;
59+
padding-top:0em;
6060
padding-right:0.05em;
6161
width: 0.8em;
62-
height: 1.2em;
62+
height: 0.8em;
6363
image: url(@theme_path/icons/arrow-up.svg);
6464
}
6565

@@ -69,7 +69,7 @@ QAbstractSpinBox::down-button {
6969
padding-top:0.2em;
7070
padding-right:0.05em;
7171
width: 0.8em;
72-
height: 1.2em;
72+
height: 0.8em;
7373
image: url(@theme_path/icons/arrow-down.svg);
7474
}
7575

@@ -114,15 +114,15 @@ QWidget:disabled
114114

115115
QLineEdit
116116
{
117-
padding: 0.1em;
117+
padding: 0.12em;
118118
border: 1px solid #111;
119119
background-color: #888;
120120
color: #111;
121121
}
122122

123123
QTextEdit, QPlainTextEdit
124124
{
125-
padding: 0.1em;
125+
padding: 0.12em;
126126
border-width: 1px;
127127
border-color: @itemdarkbackground;
128128
border-style: solid;
@@ -133,7 +133,7 @@ QTextEdit, QPlainTextEdit
133133

134134
QPushButton
135135
{
136-
padding: 0.1em;
136+
padding: 0.12em;
137137
border-width: 1px;
138138
border-color: @itembackground;
139139
border-style: solid;
@@ -144,7 +144,7 @@ QPushButton
144144

145145
QToolButton
146146
{
147-
padding: 0.1em;
147+
padding: 0.12em;
148148
border-width: 1px;
149149
border-color: @itembackground;
150150
border-style: solid;
@@ -198,7 +198,7 @@ QComboBox {
198198
border-style: solid;
199199
border: 1px solid #1e1e1e;
200200
border-radius: 0px;
201-
padding: 0.1em 1em 0.1em 0.1em;
201+
padding: 0.12em 1.2em 0.12em 0.12em;
202202
}
203203

204204

@@ -207,7 +207,7 @@ QComboBox:hover,QPushButton:hover,QToolButton:hover,QAbstractSpinBox:hover {
207207
}
208208

209209
QComboBox:on {
210-
padding: 0.1em;
210+
padding: 0.12em;
211211
padding-left: 0.2em;
212212
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
213213
stop: 0 #555,
@@ -230,7 +230,7 @@ QComboBox:editable QLineEdit {
230230
QComboBox QAbstractItemView, QComboBox QListView {
231231
border: none;
232232
border-radius: 0px;
233-
padding: 0.1em;
233+
padding: 0.12em;
234234
background: @itemdarkbackground;
235235
color: @text;
236236
selection-background-color: @selection;
@@ -251,16 +251,16 @@ QComboBox::down-arrow
251251
}
252252

253253
QComboBox:item {
254-
padding-left: 1.5em;
255-
height:1.2em;
254+
padding-left: 1.3em;
255+
height:1.25em;
256256
}
257257
QComboBox:item:selected {
258-
padding-left: 1.5em;
259-
height:1.2em;
258+
padding-left: 1.3em;
259+
height:1.25em;
260260
}
261261
QComboBox:item:checked {
262-
padding-left: 1.5em;
263-
height:1.2em;
262+
padding-left: 1.3em;
263+
height:1.25em;
264264
}
265265

266266
QLineEdit:focus
@@ -435,6 +435,10 @@ QProgressBar::chunk
435435
margin: 1px;
436436
}
437437

438+
QTabWidget::pane {
439+
border: 1px solid @itemdarkbackground;
440+
}
441+
438442
QTabBar::tab {
439443
color: @text;
440444
border: 1px solid @itemdarkbackground;

0 commit comments

Comments
 (0)