Skip to content

Commit

Permalink
[themes] Fix a few more issues with Blend of Gray
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 b61d6f8 commit 495b768
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
45 changes: 28 additions & 17 deletions resources/themes/Blend of Gray/style.qss
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 @@ -252,6 +256,7 @@ QComboBox:item:selected {
QComboBox:item:checked {
padding-left: 1.3em;
height:1.25em;
text-decoration:underline;
}

QLineEdit:focus
Expand All @@ -270,15 +275,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 @@ -288,14 +293,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 @@ -544,26 +549,32 @@ 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: 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 */
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/Blend of Gray/variables.qss
Expand Up @@ -3,6 +3,7 @@
@itemalternativebackground: #9a9a9a;
@itemdarkbackground: #373737
@darkgradient: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #535353, stop: 1 #373737)
@gradient: QLinearGradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b2b2b2, stop:1 #8f8f8f)
@text: #0e0e0e;
@toggleoff: #373737
@toggleon: #ee7913
Expand Down

0 comments on commit 495b768

Please sign in to comment.