From 0a845fb563941bd5aa38ea459a6e1e1b1fdc6e5f Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Fri, 30 Oct 2015 12:53:44 +0100 Subject: [PATCH] Adwaita: fix switch sizing moving -GtkSwitch-slider-width and -GtkSwitch-slider-height from the GtkSwitch selector to the * wildcard selector as other style props. --- gtk/theme/Adwaita/_common.scss | 11 +++++------ gtk/theme/Adwaita/gtk-contained-dark.css | 7 +++---- gtk/theme/Adwaita/gtk-contained.css | 7 +++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 05a0c05cf7..b2e5295bae 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1945,13 +1945,12 @@ notebook { * Switch * **********/ -GtkSwitch { - -GtkSwitch-slider-width: 45px; // 55px is the right value to make it as tall - // as buttons, not doing that for now - -GtkSwitch-slider-height: 27px; -} - switch { + @at-root * { + -GtkSwitch-slider-width: 45px; + -GtkSwitch-slider-height: 27px; + } + font-weight: bold; font-size: smaller; outline-offset: -4px; diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 4ec0208942..8295dc09f3 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2478,10 +2478,6 @@ notebook { /********** * Switch * **********/ -GtkSwitch { - -GtkSwitch-slider-width: 45px; - -GtkSwitch-slider-height: 27px; } - switch { font-weight: bold; font-size: smaller; @@ -2492,6 +2488,9 @@ switch { color: #eeeeec; background-image: linear-gradient(to bottom, #2d3232); text-shadow: 0 1px rgba(0, 0, 0, 0.1); } + * { + -GtkSwitch-slider-width: 45px; + -GtkSwitch-slider-height: 27px; } switch:active { background-image: linear-gradient(to bottom, #215d9c 2px, #266cb5); color: white; diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 641e295ac1..5b1d9ae910 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2484,10 +2484,6 @@ notebook { /********** * Switch * **********/ -GtkSwitch { - -GtkSwitch-slider-width: 45px; - -GtkSwitch-slider-height: 27px; } - switch { font-weight: bold; font-size: smaller; @@ -2498,6 +2494,9 @@ switch { color: #2e3436; background-image: linear-gradient(to bottom, #cfcfcf); text-shadow: 0 1px rgba(0, 0, 0, 0.1); } + * { + -GtkSwitch-slider-width: 45px; + -GtkSwitch-slider-height: 27px; } switch:active { background-image: linear-gradient(to bottom, #4a90d9 2px, #63a0de); color: white;