diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index b9162bee1e..6e6a8203a9 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -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"); } diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index e03914acb0..7724ebfd52 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -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; } } } } } diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 777f0cb8d6..9a97f03e43 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -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; diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index d7bb3e336a..d0fc8a1614 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -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; } /************************* diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss index 3ce51c21d3..7eaac032a9 100644 --- a/gtk/theme/HighContrast/_common.scss +++ b/gtk/theme/HighContrast/_common.scss @@ -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); } } diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css b/gtk/theme/HighContrast/gtk-contained-inverse.css index f35b65b0e3..adf2404ba3 100644 --- a/gtk/theme/HighContrast/gtk-contained-inverse.css +++ b/gtk/theme/HighContrast/gtk-contained-inverse.css @@ -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; diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css index 9f73cf8382..7955d1e6a0 100644 --- a/gtk/theme/HighContrast/gtk-contained.css +++ b/gtk/theme/HighContrast/gtk-contained.css @@ -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; diff --git a/gtk/theme/win32/gtk-win32-base.css b/gtk/theme/win32/gtk-win32-base.css index e178fabd67..8762f65b2d 100644 --- a/gtk/theme/win32/gtk-win32-base.css +++ b/gtk/theme/win32/gtk-win32-base.css @@ -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); }