GTK 3.20 :: Implement scale color code (#459)

* * Implement scale color code.

* * Converted old style.

* * Fixed gtk warning.
(cherry picked from commit The-Megax/Numix@1f623bf)
pull/487/head
Csaba Jakosa 2016-06-12 11:11:50 -05:00 committed by Dustin Falgout
parent 1d941a1597
commit a9f82512b6
1 changed files with 68 additions and 5 deletions

View File

@ -142,7 +142,7 @@
$_marks_length: 3px; $_marks_length: 3px;
$_marks_distance: 1px; $_marks_distance: 1px;
$button_bg: if(hue($bg_color) == 0deg, shade($bg_color, 1.2), $bg_color); $button_bg: if(hue($bg_color) == 0deg, shade($bg_color, 1.2), $bg_color);
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); $ease-out-quad: cubic-bezier(.25, .46, .45, .94);
$button_transition: all 200ms $ease-out-quad; $button_transition: all 200ms $ease-out-quad;
min-height: 10px; min-height: 10px;
@ -154,6 +154,7 @@
trough { padding: 0 7px; } trough { padding: 0 7px; }
highlight, fill { margin: 0 -7px; } highlight, fill { margin: 0 -7px; }
} }
&.vertical { &.vertical {
padding: 0 6px; padding: 0 6px;
@ -209,9 +210,7 @@
.osd & { .osd & {
background-color: lighten($osd_bg, 7%); background-color: lighten($osd_bg, 7%);
highlight { highlight { background-color: $selected_bg_color; }
background-color: $selected_bg_color;
}
} }
// Troughs in selected list-rows and infobars // Troughs in selected list-rows and infobars
@ -280,11 +279,13 @@
background-color: mix($selected_fg_color, $selected_bg_color, .85); background-color: mix($selected_fg_color, $selected_bg_color, .85);
border-color: mix($selected_fg_color, $selected_bg_color, .85); border-color: mix($selected_fg_color, $selected_bg_color, .85);
} }
&:active { &:active {
background-color: mix($selected_fg_color, $selected_bg_color, .5); background-color: mix($selected_fg_color, $selected_bg_color, .5);
border-color: mix($selected_fg_color, $selected_bg_color, .5); border-color: mix($selected_fg_color, $selected_bg_color, .5);
} }
&:disabled{
&:disabled {
background-color: mix($selected_fg_color, $selected_bg_color, .55); background-color: mix($selected_fg_color, $selected_bg_color, .55);
border-color: mix($selected_fg_color, $selected_bg_color, .55); border-color: mix($selected_fg_color, $selected_bg_color, .55);
} }
@ -335,6 +336,7 @@
} }
} }
} }
&.horizontal { &.horizontal {
indicator { indicator {
min-height: $_marks_length; min-height: $_marks_length;
@ -343,6 +345,7 @@
&.fine-tune indicator { min-height: ($_marks_length - 1px); } &.fine-tune indicator { min-height: ($_marks_length - 1px); }
} }
&.vertical { &.vertical {
indicator { indicator {
min-height: 1px; min-height: 1px;
@ -351,5 +354,65 @@
&.fine-tune indicator { min-width: ($_marks_length - 1px); } &.fine-tune indicator { min-width: ($_marks_length - 1px); }
} }
&.color {
trough {
padding: 0;
border: 0;
background-image: none;
}
highlight, fill { margin: 0; }
&.horizontal {
padding: 0 0 6px 0;
trough {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
slider {
&:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
margin-bottom: 0;
margin-top: 0;
}
}
}
&.vertical {
&:dir(ltr) {
padding: 0 0 0 6px;
trough {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
slider {
&:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
margin-left: 0;
margin-right: 0;
}
}
}
&:dir(rtl) {
padding: 0 6px 0 0;
trough {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
slider {
&:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
margin-right: 0;
margin-left: 0;
}
}
}
}
}
} }
} }