Skip to content

Commit e91e3d0

Browse files
github-actions[bot]nyalldawson
authored andcommittedMay 21, 2020
[themes] Fix slider 'fill' missing in themes and improve looks of night mapping theme slider
1 parent ed4a14e commit e91e3d0

File tree

2 files changed

+48
-18
lines changed

2 files changed

+48
-18
lines changed
 

‎resources/themes/Blend of Gray/style.qss

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -681,31 +681,49 @@ QCheckBox::indicator:checked:disabled {
681681

682682
QSlider::groove:horizontal {
683683
border: 1px solid @itemdarkbackground;
684+
border-radius: 0.15em;
684685
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
685686
background-color: @itemdarkbackground;
686-
margin: 2px 0;
687+
margin: 0.15em 1px;
687688
}
688689

689690
QSlider::groove:vertical {
690691
border: 1px solid @itemdarkbackground;
692+
border-radius: 0.15em;
691693
width: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
692694
background-color: @itemdarkbackground;
693-
margin: 2px 0;
695+
margin: 1px 0.15em;
694696
}
695697

696698
QSlider::handle:horizontal {
697699
background: @gradient;
698700
border: 1px solid @itemdarkbackground;
699701
width: 1.3em;
700-
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
702+
margin: -0.15em -1px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
701703
border-radius: 0.15em;
702704
}
703705
QSlider::handle:vertical {
704706
background: @gradient;
705707
border: 1px solid @itemdarkbackground;
706708
height: 1.3em;
707-
margin: 0 -2px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
709+
margin: -1px -0.15em; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
710+
border-radius: 0.15em;
711+
}
712+
713+
QSlider::sub-page:horizontal {
714+
border: 1px solid @itemdarkbackground;
715+
border-radius: 0.15em;
716+
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
717+
background-color: @itembackground;
718+
margin: 0.15em 1px;
719+
}
720+
721+
QSlider::sub-page:vertical {
722+
border: 1px solid @itemdarkbackground;
708723
border-radius: 0.15em;
724+
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
725+
background-color: @itembackground;
726+
margin: 1px 0.15em;
709727
}
710728

711729
/* ==================================================================================== */

‎resources/themes/Night Mapping/style.qss

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -690,32 +690,44 @@ QCheckBox::indicator:checked:disabled {
690690
/* ==================================================================================== */
691691

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

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

706706
QSlider::handle:horizontal {
707-
background: @gradient;
708-
border: 1px solid @itemdarkbackground;
707+
background: @darkgradient;
708+
border: 1px solid @itembackground;
709709
width: 1.3em;
710-
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
711-
border-radius: 0.15em;
710+
margin: -0.15em -1px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
712711
}
713712
QSlider::handle:vertical {
714-
background: @gradient;
715-
border: 1px solid @itemdarkbackground;
713+
background: @darkgradient;
714+
border: 1px solid @itembackground;
716715
height: 1.3em;
717-
margin: 0 -2px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
718-
border-radius: 0.15em;
716+
margin: -1px -0.15em; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
717+
}
718+
719+
QSlider::sub-page:horizontal {
720+
border: 1px solid @selection;
721+
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
722+
background-color: @selection;
723+
margin: 0.15em 1px;
724+
}
725+
726+
QSlider::sub-page:vertical {
727+
border: 1px solid @selection;
728+
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
729+
background-color: @selection;
730+
margin: 1px 0.15em;
719731
}
720732

721733
/* ==================================================================================== */

0 commit comments

Comments
 (0)
Please sign in to comment.