Adwaita: Update switch styling

Use the new element names instead of the type name and style
classes.

Note that there is one problem with moving away from type names
here: it turns out that style properties only work if the selector
uses the type name.
This commit is contained in:
Matthias Clasen 2015-10-22 21:42:20 -04:00
parent 48b30e8e91
commit 99d7648517
3 changed files with 897 additions and 734 deletions

View File

@ -1955,14 +1955,15 @@ GtkSwitch {
-GtkSwitch-slider-width: 45px; // 55px is the right value to make it as tall -GtkSwitch-slider-width: 45px; // 55px is the right value to make it as tall
// as buttons, not doing that for now // as buttons, not doing that for now
-GtkSwitch-slider-height: 27px; -GtkSwitch-slider-height: 27px;
}
switch {
font-weight: bold; font-weight: bold;
font-size: smaller; font-size: smaller;
outline-offset: -4px; outline-offset: -4px;
box-shadow: inset 0 1px transparentize(black, 0.9), // needs to be set here box-shadow: inset 0 1px transparentize(black, 0.9), // needs to be set here
_widget_edge(); // otherwise it gets _widget_edge(); // otherwise it gets
// clipped // clipped
&.trough {
// similar to the .scale // similar to the .scale
border: 1px solid $borders_color; border: 1px solid $borders_color;
border-radius: 3px; border-radius: 3px;
@ -1998,15 +1999,14 @@ GtkSwitch {
background-image: linear-gradient(to bottom, $selected_bg_color); background-image: linear-gradient(to bottom, $selected_bg_color);
box-shadow: none; box-shadow: none;
} }
}
&:insensitive { &:insensitive {
color: $backdrop_insensitive_color; color: $backdrop_insensitive_color;
border-color: $backdrop_borders_color; border-color: $backdrop_borders_color;
background-image: none; background-image: none;
background-color: $insensitive_bg_color; background-color: $insensitive_bg_color;
} }
} & slider {
}
&.slider {
border: 1px solid; border: 1px solid;
border-radius: 3px; border-radius: 3px;
@include button(normal); @include button(normal);
@ -2047,7 +2047,6 @@ GtkSwitch {
&.slider:active { border-color: $selected_borders_color; } &.slider:active { border-color: $selected_borders_color; }
} }
} }
} }
/************************* /*************************

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff