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

117 lines
2.9 KiB
SCSS
Raw Normal View History

2014-11-23 17:06:45 +00:00
/***********************
! Check and Radio items
************************/
2015-05-31 16:20:35 +00:00
$suffix: if($variant == "dark", "-dark", "");
2014-12-06 11:57:06 +00:00
@mixin toggle($type) {
background-image: none;
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
-gtk-icon-source: url("../assets/#{$type}-unchecked#{$suffix}.png");
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-unchecked-insensitive#{$suffix}.png"); }
&:checked, &:active {
2015-05-31 16:20:35 +00:00
-gtk-icon-source: url("../assets/#{$type}-checked#{$suffix}.png");
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-checked-insensitive#{$suffix}.png"); }
}
&:inconsistent {
2015-05-31 16:20:35 +00:00
-gtk-icon-source: url("../assets/#{$type}-mixed#{$suffix}.png");
2015-05-31 16:20:35 +00:00
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-mixed-insensitive#{$suffix}.png"); }
}
2014-12-06 11:57:06 +00:00
&.menuitem {
-gtk-icon-source: none;
2014-12-06 11:57:06 +00:00
&:insensitive { -gtk-icon-source: none; }
2014-12-06 11:57:06 +00:00
&:checked, &:active {
2015-05-31 16:20:35 +00:00
-gtk-icon-source: url("../assets/menuitem-#{$type}-checked.png");
2015-05-31 16:20:35 +00:00
&:hover { -gtk-icon-source: url("../assets/menuitem-#{$type}-checked-hover.png"); }
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
&:insensitive { -gtk-icon-source: url("../assets/menuitem-#{$type}-checked-insensitive.png"); }
2014-12-06 11:57:06 +00:00
}
&:inconsistent {
2015-05-31 16:20:35 +00:00
-gtk-icon-source: url("../assets/menuitem-#{$type}-mixed.png");
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
&:hover { -gtk-icon-source: url("../assets/menuitem-#{$type}-mixed-hover.png"); }
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
&:insensitive { -gtk-icon-source: url("../assets/menuitem-#{$type}-mixed-insensitive.png"); }
2014-12-06 11:57:06 +00:00
}
}
}
@include exports("checkradio") {
* {
-GtkCheckButton-indicator-size: 16;
2015-05-31 16:20:35 +00:00
-GtkCheckMenuItem-indicator-size: 16;
}
.radio { @include toggle("radio"); }
2014-12-06 11:57:06 +00:00
.check { @include toggle("checkbox"); }
2014-11-23 17:06:45 +00:00
GtkIconView.content-view.cell.check {
2015-05-31 16:20:35 +00:00
-gtk-icon-source: url("assets/grid-selection-unchecked#{$suffix}.png");
2014-12-06 11:57:06 +00:00
2015-05-31 16:20:35 +00:00
&:active { -gtk-icon-source: url("assets/grid-selection-checked#{$suffix}.png"); }
}
2014-12-06 11:57:06 +00:00
}
2014-11-23 17:06:45 +00:00
/********
! Switch
*********/
@include exports("switch") {
GtkSwitch {
padding: 0;
border-radius: $roundness;
font: bold condensed;
outline-offset: -4px;
&.slider {
2015-05-31 16:20:35 +00:00
@include linear-gradient(shade($bg_color, 1.2));
border: 1px solid rgba(0,0,0,0.2);
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .12);
&:insensitive {
2015-05-31 16:20:35 +00:00
border-color: rgba(0,0,0,0.1);
background-color: shade($bg_color, 0.9);
2015-05-31 16:20:35 +00:00
box-shadow: none;
}
2014-11-23 17:06:45 +00:00
}
&.trough {
2015-05-31 16:20:35 +00:00
@include linear-gradient(shade($bg_color, .95), to top);
2014-12-13 12:06:16 +00:00
border: 1px solid border_normal($bg_color);
color: $fg_color;
2015-05-31 16:20:35 +00:00
box-shadow: inset 1px 0 alpha($dark_shadow, .07),
inset 0 1px alpha($dark_shadow, .08),
inset -1px 0 alpha($dark_shadow, .07),
inset 0 -1px alpha($dark_shadow, .05);
&:active {
2015-05-31 16:20:35 +00:00
@include linear-gradient($selected_bg_color, to top);
border-color: shade($selected_bg_color, 0.9);
color: $selected_fg_color;
}
&:insensitive {
2015-05-31 16:20:35 +00:00
@include linear-gradient(shade($bg_color, .9), to top);
2014-12-13 12:06:16 +00:00
border-color: border_insensitive($bg_color);
color: mix($fg_color, $bg_color, 0.5);
}
2014-11-23 17:06:45 +00:00
}
}
}