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) {
|
2014-10-20 08:22:07 +00:00
|
|
|
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"); }
|
2014-10-20 08:22:07 +00:00
|
|
|
|
|
|
|
&: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"); }
|
2014-10-20 08:22:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:inconsistent {
|
2015-05-31 16:20:35 +00:00
|
|
|
-gtk-icon-source: url("../assets/#{$type}-mixed#{$suffix}.png");
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2015-05-31 16:20:35 +00:00
|
|
|
&:insensitive { -gtk-icon-source: url("../assets/#{$type}-mixed-insensitive#{$suffix}.png"); }
|
2014-10-20 08:22:07 +00:00
|
|
|
}
|
|
|
|
|
2014-12-06 11:57:06 +00:00
|
|
|
&.menuitem {
|
|
|
|
-gtk-icon-source: none;
|
2014-10-20 08:22:07 +00:00
|
|
|
|
2014-12-06 11:57:06 +00:00
|
|
|
&:insensitive { -gtk-icon-source: none; }
|
2014-10-20 08:22:07 +00:00
|
|
|
|
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");
|
2014-10-20 08:22:07 +00:00
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
2014-10-20 08:22:07 +00:00
|
|
|
}
|
|
|
|
|
2014-12-08 19:35:19 +00:00
|
|
|
@include exports("checkradio") {
|
|
|
|
* {
|
|
|
|
-GtkCheckButton-indicator-size: 16;
|
2015-05-31 16:20:35 +00:00
|
|
|
-GtkCheckMenuItem-indicator-size: 16;
|
2014-12-08 19:35:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.radio { @include toggle("radio"); }
|
2014-12-06 11:57:06 +00:00
|
|
|
|
2014-12-08 19:35:19 +00:00
|
|
|
.check { @include toggle("checkbox"); }
|
2014-11-23 17:06:45 +00:00
|
|
|
|
2014-12-08 19:35:19 +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-08 19:35:19 +00:00
|
|
|
}
|
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") {
|
|
|
|
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);
|
2014-12-08 19:35:19 +00:00
|
|
|
|
|
|
|
&:insensitive {
|
2015-05-31 16:20:35 +00:00
|
|
|
border-color: rgba(0,0,0,0.1);
|
2014-12-08 19:35:19 +00:00
|
|
|
background-color: shade($bg_color, 0.9);
|
2015-05-31 16:20:35 +00:00
|
|
|
box-shadow: none;
|
2014-12-08 19:35:19 +00:00
|
|
|
}
|
2014-11-23 17:06:45 +00:00
|
|
|
}
|
|
|
|
|
2014-12-08 19:35:19 +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);
|
2014-12-08 19:35:19 +00:00
|
|
|
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);
|
2014-12-08 19:35:19 +00:00
|
|
|
|
|
|
|
&:active {
|
2015-05-31 16:20:35 +00:00
|
|
|
@include linear-gradient($selected_bg_color, to top);
|
|
|
|
|
2014-12-08 19:35:19 +00:00
|
|
|
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);
|
2014-12-08 19:35:19 +00:00
|
|
|
color: mix($fg_color, $bg_color, 0.5);
|
|
|
|
}
|
2014-11-23 17:06:45 +00:00
|
|
|
}
|
|
|
|
}
|
2014-10-20 08:22:07 +00:00
|
|
|
}
|