Skip to content

Commit 63156db

Browse files
committedJan 12, 2019
[themes] Fix a few more issues with Night Mapping
- provide a visual feedback for checked menu actions - improve scrollbar styling - fix broken vertical slider
1 parent 7e39711 commit 63156db

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed
 

‎resources/themes/Night Mapping/style.qss

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,17 @@ QMenu::item:disabled
9999
padding: 0.2em 1.3em 0.2em 1.3em;
100100
}
101101

102-
103102
QMenu::item:selected
104103
{
105104
background-color: @selection;
106105
color: @text;
107106
}
108107

108+
QMenu::item:checked
109+
{
110+
text-decoration:underline;
111+
}
112+
109113
QWidget:disabled
110114
{
111115
color: #404040;
@@ -261,6 +265,7 @@ QComboBox:item:selected {
261265
QComboBox:item:checked {
262266
padding-left: 1.3em;
263267
height:1.25em;
268+
text-decoration:underline;
264269
}
265270

266271
QLineEdit:focus
@@ -279,15 +284,15 @@ QTextEdit:focus
279284
/* ==================================================================================== */
280285

281286
QScrollBar:horizontal {
282-
background-color: #333;
287+
background-color: @itemdarkbackground;
283288
height: 0.5em;
284289
margin: 0px;
285290
padding: 0px;
286291
}
287292

288293
QScrollBar::handle:horizontal {
289-
border: 1px solid #111;
290-
background: @itembackground;
294+
border: 1px solid @itemdarkbackground;
295+
background: @background;
291296
}
292297

293298
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
@@ -297,14 +302,14 @@ QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
297302
}
298303

299304
QScrollBar:vertical {
300-
background-color: #333;
305+
background-color: @itemdarkbackground;
301306
width: 0.5em;
302307
margin: 0;
303308
}
304309

305310
QScrollBar::handle:vertical {
306-
border: 1px solid #111;
307-
background: @itembackground;
311+
border: 1px solid @itemdarkbackground;
312+
background: @background;
308313
}
309314

310315
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical,
@@ -553,27 +558,33 @@ QCheckBox::indicator:checked {
553558
/* SLIDER */
554559
/* ==================================================================================== */
555560

556-
QSlider::groove:horizontal,
557-
QSlider::groove:vertical {
561+
QSlider::groove:horizontal {
558562
border: 1px solid @itemdarkbackground;
559563
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
560-
background-color: @itembackground;
564+
background-color: @itemdarkbackground;
565+
margin: 2px 0;
566+
}
567+
568+
QSlider::groove:vertical {
569+
border: 1px solid @itemdarkbackground;
570+
width: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
571+
background-color: @itemdarkbackground;
561572
margin: 2px 0;
562573
}
563574

564575
QSlider::handle:horizontal {
565-
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
566-
border: 1px solid itemdarkbackground;
567-
width: 1em;
576+
background: @gradient;
577+
border: 1px solid @itemdarkbackground;
578+
width: 1.3em;
568579
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
569-
border-radius: 0px;
580+
border-radius: 0.15em;
570581
}
571582
QSlider::handle:vertical {
572-
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
573-
border: 1px solid itemdarkbackground;
574-
height: 1em;
575-
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
576-
border-radius: 0px;
583+
background: @gradient;
584+
border: 1px solid @itemdarkbackground;
585+
height: 1.3em;
586+
margin: 0 -2px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
587+
border-radius: 0.15em;
577588
}
578589

579590
/* ==================================================================================== */

‎resources/themes/Night Mapping/variables.qss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@itemalternativebackground: #9a9a9a
44
@itemdarkbackground: #535353
55
@darkgradient: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646)
6+
@gradient: QLinearGradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f)
67
@textlight: #ddd
78
@text: #aaa
89
@toggleoff: #535353

0 commit comments

Comments
 (0)
Please sign in to comment.