forked from AuroraMiddleware/gtk
switch: An active switch is :checked
Fix an oversight that should have happened in the gadget refactoring: An active switch should be :checked, just like togglebuttons, checkbuttons, etc.
This commit is contained in:
parent
3f077ec36f
commit
41195f6300
@ -1197,9 +1197,9 @@ gtk_switch_set_state (GtkSwitch *sw,
|
||||
gtk_switch_set_active (sw, state);
|
||||
|
||||
if (state)
|
||||
gtk_widget_set_state_flags (GTK_WIDGET (sw), GTK_STATE_FLAG_ACTIVE, FALSE);
|
||||
gtk_widget_set_state_flags (GTK_WIDGET (sw), GTK_STATE_FLAG_CHECKED, FALSE);
|
||||
else
|
||||
gtk_widget_unset_state_flags (GTK_WIDGET (sw), GTK_STATE_FLAG_ACTIVE);
|
||||
gtk_widget_unset_state_flags (GTK_WIDGET (sw), GTK_STATE_FLAG_CHECKED);
|
||||
|
||||
g_object_notify (G_OBJECT (sw), "state");
|
||||
}
|
||||
|
@ -2414,7 +2414,7 @@ switch {
|
||||
background-image: linear-gradient(to bottom, mix($bg_color, $borders_color, 60%));
|
||||
text-shadow: 0 1px transparentize(black, 0.9);
|
||||
|
||||
&:active {
|
||||
&:checked {
|
||||
color: white;
|
||||
border-color: $selected_borders_color;
|
||||
background-color: $selected_bg_color;
|
||||
@ -2441,7 +2441,7 @@ switch {
|
||||
text-shadow: none;
|
||||
transition: $backdrop_transition;
|
||||
|
||||
&:active {
|
||||
&:checked {
|
||||
@if $variant == 'light' { color: $backdrop_bg_color; }
|
||||
border-color: if($variant == 'light', $selected_bg_color,
|
||||
$selected_borders_color);
|
||||
@ -2470,7 +2470,7 @@ switch {
|
||||
|
||||
&:hover slider { @include button(hover-alt, $edge: $shadow_color); }
|
||||
|
||||
&:active slider { border: 1px solid $selected_borders_color; }
|
||||
&:checked slider { border: 1px solid $selected_borders_color; }
|
||||
|
||||
&:disabled slider { @include button(insensitive); }
|
||||
|
||||
@ -2481,7 +2481,7 @@ switch {
|
||||
@include button(backdrop);
|
||||
}
|
||||
|
||||
&:active slider { border-color: if($variant == 'light', $selected_bg_color, $selected_borders_color); }
|
||||
&:checked slider { border-color: if($variant == 'light', $selected_bg_color, $selected_borders_color); }
|
||||
|
||||
&:disabled slider { @include button(backdrop-insensitive); }
|
||||
}
|
||||
@ -2496,7 +2496,7 @@ switch {
|
||||
&.slider:dir(rtl) { border-left-color: $borders_color; }
|
||||
&.slider:dir(ltr) { border-right-color: $borders_color; }
|
||||
|
||||
&.slider { &:active, & { border-color: $selected_borders_color; } }
|
||||
&.slider { &:checked, & { border-color: $selected_borders_color; } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2562,7 +2562,7 @@ switch {
|
||||
color: #eeeeec;
|
||||
background-image: linear-gradient(to bottom, #2d3232);
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
|
||||
switch:active {
|
||||
switch:checked {
|
||||
color: white;
|
||||
border-color: #0f2b48;
|
||||
background-color: #215d9c;
|
||||
@ -2583,7 +2583,7 @@ switch {
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
transition: 200ms ease-out; }
|
||||
switch:backdrop:active {
|
||||
switch:backdrop:checked {
|
||||
border-color: #0f2b48;
|
||||
background-image: linear-gradient(to bottom, #215d9c);
|
||||
box-shadow: none; }
|
||||
@ -2612,7 +2612,7 @@ switch {
|
||||
border-color: #1c1f1f;
|
||||
background-image: linear-gradient(to bottom, #393f3f 20%, #2f3434 90%);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), inset 0 -2px #323737, inset 0 -1px #2a2f2f, 0 1px rgba(0, 0, 0, 0.1); }
|
||||
switch:active slider {
|
||||
switch:checked slider {
|
||||
border: 1px solid #0f2b48; }
|
||||
switch:disabled slider {
|
||||
border-color: #1c1f1f;
|
||||
@ -2631,7 +2631,7 @@ switch {
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
switch:backdrop slider label, switch:backdrop slider {
|
||||
color: #949796; }
|
||||
switch:backdrop:active slider {
|
||||
switch:backdrop:checked slider {
|
||||
border-color: #0f2b48; }
|
||||
switch:backdrop:disabled slider {
|
||||
border-color: #1f2222;
|
||||
|
@ -2575,7 +2575,7 @@ switch {
|
||||
color: #2e3436;
|
||||
background-image: linear-gradient(to bottom, #cacac8);
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
|
||||
switch:active {
|
||||
switch:checked {
|
||||
color: white;
|
||||
border-color: #184472;
|
||||
background-color: #4a90d9;
|
||||
@ -2596,7 +2596,7 @@ switch {
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
transition: 200ms ease-out; }
|
||||
switch:backdrop:active {
|
||||
switch:backdrop:checked {
|
||||
color: #e8e8e7;
|
||||
border-color: #4a90d9;
|
||||
background-image: linear-gradient(to bottom, #4a90d9);
|
||||
@ -2626,7 +2626,7 @@ switch {
|
||||
border-color: #9d9d99;
|
||||
background-image: linear-gradient(to bottom, #fefefe 10%, #f2f2f1 90%);
|
||||
box-shadow: inset 0 1px white, inset 0 -2px #f4f4f4, inset 0 -1px #cfcfcd, 0 1px rgba(0, 0, 0, 0.1); }
|
||||
switch:active slider {
|
||||
switch:checked slider {
|
||||
border: 1px solid #184472; }
|
||||
switch:disabled slider {
|
||||
border-color: #9d9d99;
|
||||
@ -2645,7 +2645,7 @@ switch {
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
|
||||
switch:backdrop slider label, switch:backdrop slider {
|
||||
color: #8b8e8f; }
|
||||
switch:backdrop:active slider {
|
||||
switch:backdrop:checked slider {
|
||||
border-color: #4a90d9; }
|
||||
switch:backdrop:disabled slider {
|
||||
border-color: #a5a5a1;
|
||||
@ -2664,7 +2664,7 @@ switch {
|
||||
border-left-color: #9d9d99; }
|
||||
row:selected switch.slider:dir(ltr) {
|
||||
border-right-color: #9d9d99; }
|
||||
row:selected switch.slider:active, row:selected switch.slider {
|
||||
row:selected switch.slider:checked, row:selected switch.slider {
|
||||
border-color: #184472; }
|
||||
|
||||
/*************************
|
||||
|
@ -1974,7 +1974,7 @@ switch {
|
||||
background-color: mix($bg_color,$borders_color,60%);
|
||||
box-shadow: inset 0 1px transparentize(black, 0.9); /*outset not working*/
|
||||
text-shadow: 0 1px transparentize(black, 0.9);
|
||||
&:active {
|
||||
&:checked {
|
||||
color: white;
|
||||
border-color: $selected_borders_color;
|
||||
background-color: $selected_bg_color;
|
||||
@ -1992,13 +1992,13 @@ switch {
|
||||
background-color: $backdrop_bg_color;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
&:active {
|
||||
&:checked {
|
||||
color: $selected_fg_color;
|
||||
border-color: $backdrop_borders_color;
|
||||
background-color: $backdrop_borders_color;
|
||||
box-shadow: none;
|
||||
}
|
||||
&:disabled, &:disabled:active {
|
||||
&:disabled, &:disabled:checked {
|
||||
background-color: $insensitive_bg_color;
|
||||
color: $insensitive_fg_color;
|
||||
border-color: $insensitive_fg_color;
|
||||
@ -2016,14 +2016,14 @@ switch {
|
||||
|
||||
&:hover slider { @include button(hover); }
|
||||
|
||||
&:active slider { border: 2px solid $selected_borders_color; }
|
||||
&:checked slider { border: 2px solid $selected_borders_color; }
|
||||
|
||||
&:disabled slider { @include button(insensitive); }
|
||||
|
||||
&:backdrop {
|
||||
slider { @include button(backdrop); }
|
||||
|
||||
&:active slider { border-color: if($variant == 'light', $selected_bg_color, $selected_borders_color); }
|
||||
&:checked slider { border-color: if($variant == 'light', $selected_bg_color, $selected_borders_color); }
|
||||
|
||||
&:disabled slider { @include button(backdrop-insensitive); }
|
||||
}
|
||||
|
@ -2027,7 +2027,7 @@ switch {
|
||||
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1);
|
||||
/*outset not working*/
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
|
||||
switch:active {
|
||||
switch:checked {
|
||||
color: white;
|
||||
border-color: #aaa;
|
||||
background-color: #aaa;
|
||||
@ -2043,12 +2043,12 @@ switch {
|
||||
background-color: #000;
|
||||
box-shadow: none;
|
||||
text-shadow: none; }
|
||||
switch:backdrop:active {
|
||||
switch:backdrop:checked {
|
||||
color: #fff;
|
||||
border-color: #737373;
|
||||
background-color: #737373;
|
||||
box-shadow: none; }
|
||||
switch:backdrop:disabled, switch:backdrop:disabled:active {
|
||||
switch:backdrop:disabled, switch:backdrop:disabled:checked {
|
||||
background-color: #070707;
|
||||
color: gray;
|
||||
border-color: gray; }
|
||||
@ -2071,7 +2071,7 @@ switch {
|
||||
background-color: #000;
|
||||
border-color: gray;
|
||||
background-image: none; }
|
||||
switch:active slider {
|
||||
switch:checked slider {
|
||||
border: 2px solid #aaa; }
|
||||
switch:disabled slider {
|
||||
border-width: 2px;
|
||||
@ -2087,7 +2087,7 @@ switch {
|
||||
background-color: #000;
|
||||
border-color: #737373;
|
||||
background-image: none; }
|
||||
switch:backdrop:active slider {
|
||||
switch:backdrop:checked slider {
|
||||
border-color: #aaa; }
|
||||
switch:backdrop:disabled slider {
|
||||
border-width: 2px;
|
||||
|
@ -2031,7 +2031,7 @@ switch {
|
||||
box-shadow: inset 0 1px rgba(0, 0, 0, 0.1);
|
||||
/*outset not working*/
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
|
||||
switch:active {
|
||||
switch:checked {
|
||||
color: white;
|
||||
border-color: #000;
|
||||
background-color: #000;
|
||||
@ -2047,12 +2047,12 @@ switch {
|
||||
background-color: #fff;
|
||||
box-shadow: none;
|
||||
text-shadow: none; }
|
||||
switch:backdrop:active {
|
||||
switch:backdrop:checked {
|
||||
color: #fff;
|
||||
border-color: #8d8d8d;
|
||||
background-color: #8d8d8d;
|
||||
box-shadow: none; }
|
||||
switch:backdrop:disabled, switch:backdrop:disabled:active {
|
||||
switch:backdrop:disabled, switch:backdrop:disabled:checked {
|
||||
background-color: white;
|
||||
color: gray;
|
||||
border-color: gray; }
|
||||
@ -2075,7 +2075,7 @@ switch {
|
||||
background-color: #fff;
|
||||
border-color: gray;
|
||||
background-image: none; }
|
||||
switch:active slider {
|
||||
switch:checked slider {
|
||||
border: 2px solid #000; }
|
||||
switch:disabled slider {
|
||||
border-width: 2px;
|
||||
@ -2091,7 +2091,7 @@ switch {
|
||||
background-color: #fff;
|
||||
border-color: #8d8d8d;
|
||||
background-image: none; }
|
||||
switch:backdrop:active slider {
|
||||
switch:backdrop:checked slider {
|
||||
border-color: #000; }
|
||||
switch:backdrop:disabled slider {
|
||||
border-width: 2px;
|
||||
|
@ -1221,7 +1221,7 @@ switch:hover slider {
|
||||
background-image: -gtk-win32-theme-part(button, 1, 2);
|
||||
}
|
||||
|
||||
switch:active slider {
|
||||
switch:checked slider {
|
||||
background-image: -gtk-win32-theme-part(button, 1, 3);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user