Skip to content

Commit

Permalink
[themes] Fix a few more issues with Night Mapping
Browse files Browse the repository at this point in the history
- provide a visual feedback for checked menu actions
- improve scrollbar styling
- fix broken vertical slider
  • Loading branch information
nirvn committed Jan 12, 2019
1 parent 7e39711 commit 63156db
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
49 changes: 30 additions & 19 deletions resources/themes/Night Mapping/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,17 @@ QMenu::item:disabled
padding: 0.2em 1.3em 0.2em 1.3em;
}


QMenu::item:selected
{
background-color: @selection;
color: @text;
}

QMenu::item:checked
{
text-decoration:underline;
}

QWidget:disabled
{
color: #404040;
Expand Down Expand Up @@ -261,6 +265,7 @@ QComboBox:item:selected {
QComboBox:item:checked {
padding-left: 1.3em;
height:1.25em;
text-decoration:underline;
}

QLineEdit:focus
Expand All @@ -279,15 +284,15 @@ QTextEdit:focus
/* ==================================================================================== */

QScrollBar:horizontal {
background-color: #333;
background-color: @itemdarkbackground;
height: 0.5em;
margin: 0px;
padding: 0px;
}

QScrollBar::handle:horizontal {
border: 1px solid #111;
background: @itembackground;
border: 1px solid @itemdarkbackground;
background: @background;
}

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
Expand All @@ -297,14 +302,14 @@ QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
}

QScrollBar:vertical {
background-color: #333;
background-color: @itemdarkbackground;
width: 0.5em;
margin: 0;
}

QScrollBar::handle:vertical {
border: 1px solid #111;
background: @itembackground;
border: 1px solid @itemdarkbackground;
background: @background;
}

QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical,
Expand Down Expand Up @@ -553,27 +558,33 @@ QCheckBox::indicator:checked {
/* SLIDER */
/* ==================================================================================== */

QSlider::groove:horizontal,
QSlider::groove:vertical {
QSlider::groove:horizontal {
border: 1px solid @itemdarkbackground;
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background-color: @itembackground;
background-color: @itemdarkbackground;
margin: 2px 0;
}

QSlider::groove:vertical {
border: 1px solid @itemdarkbackground;
width: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background-color: @itemdarkbackground;
margin: 2px 0;
}

QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
border: 1px solid itemdarkbackground;
width: 1em;
background: @gradient;
border: 1px solid @itemdarkbackground;
width: 1.3em;
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 0px;
border-radius: 0.15em;
}
QSlider::handle:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
border: 1px solid itemdarkbackground;
height: 1em;
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 0px;
background: @gradient;
border: 1px solid @itemdarkbackground;
height: 1.3em;
margin: 0 -2px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 0.15em;
}

/* ==================================================================================== */
Expand Down
1 change: 1 addition & 0 deletions resources/themes/Night Mapping/variables.qss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@itemalternativebackground: #9a9a9a
@itemdarkbackground: #535353
@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)
@gradient: QLinearGradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f)
@textlight: #ddd
@text: #aaa
@toggleoff: #535353
Expand Down

0 comments on commit 63156db

Please sign in to comment.