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

105 lines
2.4 KiB
SCSS
Raw Normal View History

2014-11-23 17:06:45 +00:00
@import "functions";
@import "global";
/***********************
! Check and Radio items
************************/
* {
-GtkCheckButton-indicator-size: 16;
-GtkCheckMenuItem-indicator-size: 14;
}
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'); }
}
}
}
2014-12-06 11:57:06 +00:00
.radio { @include toggle("radio"); }
.check { @include toggle("checkbox"); }
2014-11-23 17:06:45 +00:00
2014-12-06 11:57:06 +00:00
GtkIconView.content-view.cell.check {
-gtk-icon-source: url("assets/grid-selection-unchecked.svg");
&:active { -gtk-icon-source: url("assets/grid-selection-checked.svg"); }
}
2014-11-23 17:06:45 +00:00
/********
! Switch
*********/
GtkSwitch {
padding: 0;
border-radius: $roundness;
font: bold condensed;
outline-offset: -4px;
&.slider {
border: 1px solid shade($bg_color, 0.8);
background-color: shade($bg_color, 1.08);
&:insensitive {
border-color: shade($bg_color, 0.85);
background-color: shade($bg_color, 0.9);
}
}
&.trough {
border-color: shade($bg_color, 0.8);
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 {
border-color: shade($bg_color, 0.85);
background-color: shade($bg_color, 0.9);
color: mix($fg_color, $bg_color, 0.5);
}
}
}