numix-gtk-theme/gtk-3.20/scss/widgets/_scrollbar.scss

135 lines
4.3 KiB
SCSS
Raw Normal View History

2016-04-09 04:30:09 +00:00
/***********
! Scrollbar
************/
@include exports("scrollbar") {
scrollbar {
$_slider_min_length: 40px;
$_slider_normal_width: 7px;
$_slider_small_width: 4px;
2016-04-09 04:30:09 +00:00
// disable steppers
@at-root * {
-GtkScrollbar-has-backward-stepper: false;
-GtkScrollbar-has-forward-stepper: false;
}
background-color: $scrollbar_bg_color;
transition: 300ms ease-out;
// scrollbar border on the content side
2016-04-09 04:30:09 +00:00
&.top { border-bottom: 1px solid $borders_color; }
&.bottom { border-top: 1px solid $borders_color; }
&.left { border-right: 1px solid $borders_color; }
&.right { border-left: 1px solid $borders_color; }
&:backdrop {
background-color: $backdrop_scrollbar_bg_color;
border-color: $backdrop_borders_color;
transition: 400ms ease-in;
}
slider {
min-width: $_slider_normal_width;
min-height: $_slider_normal_width;
border: 1px solid transparent;
border-radius: $roundness;
2016-04-09 04:30:09 +00:00
background-clip: padding-box;
background-color: $scrollbar_slider_color;
&:hover { background-color: $scrollbar_slider_hover_color; }
&:hover:active { background-color: $scrollbar_slider_active_color; }
&:backdrop { background-color: $backdrop_scrollbar_slider_color; }
&:disabled { background-color: transparent; }
}
&.horizontal slider { min-width: $_slider_min_length; }
&.vertical slider { min-height: $_slider_min_length; }
2016-04-09 04:30:09 +00:00
&.fine-tune slider:active {
background-color: lighten($scrollbar_slider_active_color, 10%);
2016-04-09 04:30:09 +00:00
}
&.overlay-indicator {
opacity: .8;
2016-04-09 04:30:09 +00:00
&:not(.dragging):not(.hovering) {
border-color: transparent;
opacity: .4;
2016-04-09 04:30:09 +00:00
background-color: transparent;
slider {
min-width: $_slider_small_width;
min-height: $_slider_small_width;
2016-04-09 04:30:09 +00:00
background-color: $fg_color;
border: 1px solid if($variant == "light", white, black);
2016-04-09 04:30:09 +00:00
}
// hide steppers
2016-04-09 04:30:09 +00:00
button {
min-width: $_slider_small_width;
min-height: $_slider_small_width;
border-color: transparent;
2016-04-09 04:30:09 +00:00
-gtk-icon-source: none;
}
&.horizontal {
slider { min-width: $_slider_min_length; }
button { min-width: $_slider_normal_width; }
2016-04-09 04:30:09 +00:00
}
&.vertical {
slider { min-height: $_slider_min_length; }
button { min-height: $_slider_normal_width; }
2016-04-09 04:30:09 +00:00
}
}
}
// stepper styling
2016-04-09 04:30:09 +00:00
button {
min-width: $_slider_normal_width;
min-height: $_slider_normal_width;
2016-04-09 04:30:09 +00:00
padding: 0;
border: 0;
border-radius: 0;
border-color: $borders_color; // FIXME overwritten by global button definition
background-color: transparent;
box-shadow: none;
2016-04-09 04:30:09 +00:00
color: $scrollbar_slider_color;
&:hover { color: $scrollbar_slider_hover_color; }
&:active, &:checked { color: $scrollbar_slider_active_color; }
&:backdrop { color: $backdrop_scrollbar_slider_color; }
2016-04-09 04:30:09 +00:00
}
// button icons
&.vertical {
button {
&.down {
-gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
border-top: 1px solid $borders_color;
}
2016-04-09 04:30:09 +00:00
&.up {
-gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
border-bottom: 1px solid $borders_color;
}
2016-04-09 04:30:09 +00:00
}
}
&.horizontal {
button {
&.down {
-gtk-icon-source: -gtk-icontheme("pan-right-symbolic");
border-left: 1px solid $borders_color;
}
2016-04-09 04:30:09 +00:00
&.up {
-gtk-icon-source: -gtk-icontheme("pan-left-symbolic");
border-right: 1px solid $borders_color;
}
2016-04-09 04:30:09 +00:00
}
}
}
}