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

109 lines
2.5 KiB
SCSS
Raw Normal View History

2014-11-23 17:06:45 +00:00
@import "functions";
@import "global";
/***********************
! Check and Radio items
************************/
2014-12-06 11:57:06 +00:00
@mixin toggle($type) {
background-image: none;
2014-12-06 11:57:06 +00:00
-gtk-icon-source: url('../assets/#{$type}-unchecked.svg');
&:insensitive { -gtk-icon-source: url('../assets/#{$type}-unchecked-insensitive.svg'); }
&:checked, &:active {
2014-12-06 11:57:06 +00:00
-gtk-icon-source: url('../assets/#{$type}-checked.svg');
&:insensitive { -gtk-icon-source: url('../assets/#{$type}-checked-insensitive.svg'); }
}
&:inconsistent {
2014-12-06 11:57:06 +00:00
-gtk-icon-source: url('../assets/#{$type}-mixed.svg');
2014-12-06 11:57:06 +00:00
&:insensitive { -gtk-icon-source: url('../assets/#{$type}-mixed-insensitive.svg'); }
}
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 {
-gtk-icon-source: url('../assets/menuitem-#{$type}-checked.svg');
2014-12-06 11:57:06 +00:00
&:hover { -gtk-icon-source: url('../assets/menuitem-#{$type}-checked-hover.svg'); }
&:insensitive { -gtk-icon-source: url('../assets/menuitem-#{$type}-checked-insensitive.svg'); }
}
&:inconsistent {
-gtk-icon-source: url('../assets/menuitem-#{$type}-mixed.svg');
&:hover { -gtk-icon-source: url('../assets/menuitem-#{$type}-mixed-hover.svg'); }
&:insensitive { -gtk-icon-source: url('../assets/menuitem-#{$type}-mixed-insensitive.svg'); }
}
}
}
@include exports("checkradio") {
* {
-GtkCheckButton-indicator-size: 16;
-GtkCheckMenuItem-indicator-size: 14;
}
.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 {
-gtk-icon-source: url("assets/grid-selection-unchecked.svg");
2014-12-06 11:57:06 +00:00
&:active { -gtk-icon-source: url("assets/grid-selection-checked.svg"); }
}
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 {
2014-12-13 12:06:16 +00:00
border: 1px solid border_normal($bg_color);
background-color: shade($bg_color, 1.08);
&:insensitive {
2014-12-13 12:06:16 +00:00
border-color: border_insensitive($bg_color);
background-color: shade($bg_color, 0.9);
}
2014-11-23 17:06:45 +00:00
}
&.trough {
2014-12-13 12:06:16 +00:00
border: 1px solid border_normal($bg_color);
background-color: shade($bg_color, 0.95);
color: $fg_color;
&:active {
border-color: shade($selected_bg_color, 0.9);
background-color: $selected_bg_color;
color: $selected_fg_color;
}
&:insensitive {
2014-12-13 12:06:16 +00:00
border-color: border_insensitive($bg_color);
background-color: shade($bg_color, 0.9);
color: mix($fg_color, $bg_color, 0.5);
}
2014-11-23 17:06:45 +00:00
}
}
}