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) {
|
2015-08-06 19:39:22 +00:00
|
|
|
background-image: none;
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
-gtk-icon-source: url("../assets/#{$type}-unchecked#{$suffix}.png");
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-unchecked-insensitive#{$suffix}.png"); }
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:checked, &:active {
|
|
|
|
-gtk-icon-source: url("../assets/#{$type}-checked#{$suffix}.png");
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-checked-insensitive#{$suffix}.png"); }
|
|
|
|
}
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:inconsistent {
|
|
|
|
-gtk-icon-source: url("../assets/#{$type}-mixed#{$suffix}.png");
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-mixed-insensitive#{$suffix}.png"); }
|
|
|
|
}
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&.menuitem {
|
|
|
|
-gtk-icon-source: none;
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:insensitive { -gtk-icon-source: none; }
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:checked, &:active {
|
|
|
|
-gtk-icon-source: url("../assets/menuitem-#{$type}-checked.png");
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:hover { -gtk-icon-source: url("../assets/menuitem-#{$type}-checked-hover.png"); }
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:insensitive { -gtk-icon-source: url("../assets/menuitem-#{$type}-checked-insensitive.png"); }
|
|
|
|
}
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:inconsistent {
|
|
|
|
-gtk-icon-source: url("../assets/menuitem-#{$type}-mixed.png");
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:hover { -gtk-icon-source: url("../assets/menuitem-#{$type}-mixed-hover.png"); }
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
&:insensitive { -gtk-icon-source: url("../assets/menuitem-#{$type}-mixed-insensitive.png"); }
|
|
|
|
}
|
|
|
|
}
|
2014-10-20 08:22:07 +00:00
|
|
|
}
|
|
|
|
|
2014-12-08 19:35:19 +00:00
|
|
|
@include exports("checkradio") {
|
2015-08-06 19:39:22 +00:00
|
|
|
* {
|
|
|
|
-GtkCheckButton-indicator-size: 16;
|
|
|
|
-GtkCheckMenuItem-indicator-size: 16;
|
|
|
|
}
|
2014-12-08 19:35:19 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
.radio { @include toggle("radio"); }
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
.check { @include toggle("checkbox"); }
|
2014-11-23 17:06:45 +00:00
|
|
|
|
2015-08-06 19:39:22 +00:00
|
|
|
GtkIconView.content-view.cell.check {
|
|
|
|
-gtk-icon-source: url("assets/grid-selection-unchecked#{$suffix}.png");
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2015-08-06 19:39:22 +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
|
|
|
|
*********/
|
|
|
|
|
2014-12-08 19:35:19 +00:00
|
|
|
@include exports("switch") {
|
2015-08-06 19:39:22 +00:00
|
|
|
GtkSwitch {
|
|
|
|
padding: 0;
|
|
|
|
border-radius: $roundness;
|
|
|
|
font: bold condensed;
|
|
|
|
outline-offset: -4px;
|
|
|
|
|
|
|
|
&.slider {
|
|
|
|
@include linear-gradient(shade($bg_color, 1.2));
|
|
|
|
|
2015-08-06 23:10:35 +00:00
|
|
|
border: 1px solid rgba(0, 0, 0, .2);
|
2015-08-16 13:28:10 +00:00
|
|
|
box-shadow: 0 1px 2px -1px fade-out($dark_shadow, .08);
|
2015-08-06 19:39:22 +00:00
|
|
|
|
|
|
|
&:insensitive {
|
2015-08-06 23:10:35 +00:00
|
|
|
border-color: rgba(0, 0, 0, .1);
|
|
|
|
background-color: shade($bg_color, .9);
|
2015-08-06 19:39:22 +00:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.trough {
|
|
|
|
@include linear-gradient(shade($bg_color, .95), to top);
|
|
|
|
|
|
|
|
border: 1px solid border_normal($bg_color);
|
|
|
|
color: $fg_color;
|
2015-08-16 13:28:10 +00:00
|
|
|
box-shadow: inset 1px 0 fade-out($dark_shadow, .13),
|
|
|
|
inset 0 1px fade-out($dark_shadow, .12),
|
|
|
|
inset -1px 0 fade-out($dark_shadow, .13),
|
|
|
|
inset 0 -1px fade-out($dark_shadow, .15);
|
2015-08-06 19:39:22 +00:00
|
|
|
|
|
|
|
&:active {
|
|
|
|
@include linear-gradient($selected_bg_color, to top);
|
|
|
|
|
2015-08-06 23:10:35 +00:00
|
|
|
border-color: shade($selected_bg_color, .9);
|
2015-08-06 19:39:22 +00:00
|
|
|
color: $selected_fg_color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:insensitive {
|
|
|
|
@include linear-gradient(shade($bg_color, .9), to top);
|
|
|
|
|
|
|
|
border-color: border_insensitive($bg_color);
|
2015-08-06 23:10:35 +00:00
|
|
|
color: mix($fg_color, $bg_color, .5);
|
2015-08-06 19:39:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-10-20 08:22:07 +00:00
|
|
|
}
|