numix-gtk-theme/gtk-3.0/scss/widgets/_progress.scss

196 lines
4.2 KiB
SCSS
Raw Normal View History

2014-12-06 09:59:35 +00:00
/*****************
! Progress bars *
******************/
@include exports("progressbar") {
GtkProgressBar {
padding: 0;
border-radius: $roundness;
font-size: smaller;
color: alpha($fg_color, 0.6);
2014-12-06 09:59:35 +00:00
-GtkProgressBar-min-horizontal-bar-height: 12;
-GtkProgressBar-min-vertical-bar-width: 12;
2014-12-06 09:59:35 +00:00
&.osd {
-GtkProgressBar-xspacing: 0;
-GtkProgressBar-yspacing: 0;
-GtkProgressBar-min-horizontal-bar-height: 3;
}
2014-12-06 09:59:35 +00:00
&.trough {
border: 1px solid alpha(border_normal($bg_color), 0.5);
background-color: shade($bg_color, 1.08);
background-image: none;
}
2014-12-06 09:59:35 +00:00
}
.progressbar {
2014-12-14 12:22:13 +00:00
@include linear-gradient($selected_bg_color);
border-radius: 0;
box-shadow: none;
2014-12-06 09:59:35 +00:00
&.left {
border-top-left-radius: $roundness;
2014-12-06 09:59:35 +00:00
border-bottom-left-radius: $roundness;
}
&.right {
2014-12-06 09:59:35 +00:00
border-top-right-radius: $roundness;
border-bottom-right-radius: $roundness;
2014-12-06 09:59:35 +00:00
}
&.left.right { box-shadow: none; }
2014-12-06 09:59:35 +00:00
&.vertical {
2014-12-14 12:22:13 +00:00
@include linear-gradient($selected_bg_color, to right);
2014-12-06 09:59:35 +00:00
&.bottom {
border-bottom-left-radius: $roundness;
border-bottom-right-radius: $roundness;
}
&.top {
border-top-left-radius: $roundness;
border-top-right-radius: $roundness;
}
}
2014-12-06 10:37:27 +00:00
}
GtkLevelBar {
-GtkLevelBar-min-block-width: 34;
-GtkLevelBar-min-block-height: 3;
2014-12-06 10:37:27 +00:00
&.vertical {
-GtkLevelBar-min-block-width: 3;
-GtkLevelBar-min-block-height: 34;
2014-12-06 10:37:27 +00:00
}
}
2014-12-06 10:37:27 +00:00
.level-bar {
&.trough {
2014-12-14 12:22:13 +00:00
@include linear-gradient(shade($bg_color, 1.08), to top);
border: 1px solid alpha(border_normal($bg_color), 0.5);
border-radius: $roundness;
2014-12-06 10:37:27 +00:00
}
&.fill-block {
2014-12-14 12:22:13 +00:00
@include linear-gradient($selected_bg_color);
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
// :nth-child working on discrete indicators
2014-12-06 10:37:27 +00:00
border-color: transparent;
border-radius: 0;
2014-12-06 10:37:27 +00:00
&.indicator-discrete {
&.horizontal { margin-right: 1px; }
&.vertical { margin-bottom: 1px; }
}
&.level-high {
background-color: $success_color;
border-color: transparent;
}
&.level-low {
background-color: $warning_color;
border-color: transparent;
}
&.empty-fill-block {
background-color: transparent;
border-color: transparent;
box-shadow: none;
}
2014-12-06 10:37:27 +00:00
}
}
.scale {
-GtkRange-slider-width: 16;
-GtkRange-trough-border: 1;
-GtkScale-slider-length: 16;
2014-12-06 10:37:27 +00:00
padding: 0;
border-width: 1px;
border-radius: $roundness;
outline-offset: -1px;
2014-12-06 10:37:27 +00:00
&.slider {
2014-12-14 12:22:13 +00:00
@include linear-gradient(shade($bg_color, 1.08));
border-radius: 8px;
2014-12-14 12:22:13 +00:00
/* we will draw the border using box shadow for now */
box-shadow: inset 1px 0 border_normal($bg_color),
inset 0 1px border_normal($bg_color),
inset -1px 0 border_normal($bg_color),
inset 0 -1px border_normal($bg_color);
&:hover, &:focus {
box-shadow: inset 1px 0 border_focus($bg_color),
inset 0 1px border_focus($bg_color),
inset -1px 0 border_focus($bg_color),
inset 0 -1px border_focus($bg_color);
}
2014-12-06 10:37:27 +00:00
&:active {
box-shadow: inset 1px 0 border_active($bg_color),
inset 0 1px border_active($bg_color),
inset -1px 0 border_active($bg_color),
inset 0 -1px border_active($bg_color);
}
2014-12-06 10:37:27 +00:00
&:insensitive {
2014-12-14 12:22:13 +00:00
@include linear-gradient(shade($bg_color, 0.9));
box-shadow: inset 1px 0 border_insensitive($bg_color),
inset 0 1px border_insensitive($bg_color),
inset -1px 0 border_insensitive($bg_color),
inset 0 -1px border_insensitive($bg_color);
}
2014-12-06 10:37:27 +00:00
}
&.fine-tune {
&, &.horizontal {
&:active, &:active:hover {
background-size: 50%;
background-repeat: no-repeat;
background-position: center;
}
2014-12-06 10:37:27 +00:00
}
}
&.mark { border-color: alpha(border_normal($bg_color), 0.5); }
2014-12-06 10:37:27 +00:00
&.trough {
2014-12-14 12:22:13 +00:00
@include linear-gradient(shade($bg_color, 1.08));
margin: 7px 0;
border: 1px solid alpha(border_normal($bg_color), 0.5);
border-radius: $roundness;
2014-12-06 10:37:27 +00:00
2014-12-14 12:22:13 +00:00
&:insensitive { @include linear-gradient(shade($bg_color, 0.9)); }
2014-12-06 10:37:27 +00:00
&.vertical { margin: 0 7px; }
}
2014-12-06 10:37:27 +00:00
&.highlight {
&, &.left, &.bottom {
2014-12-14 12:22:13 +00:00
@include linear-gradient($selected_bg_color);
border-color: $selected_bg_color;
2014-12-06 10:37:27 +00:00
&:insensitive {
2014-12-14 12:22:13 +00:00
@include linear-gradient(shade($bg_color, 0.8));
border-color: shade($bg_color, 0.7);
}
2014-12-06 10:37:27 +00:00
}
}
}
}