[gtk+] Adwaita: fix switch sizing
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Adwaita: fix switch sizing
- Date: Fri, 30 Oct 2015 11:55:41 +0000 (UTC)
commit 0a845fb563941bd5aa38ea459a6e1e1b1fdc6e5f
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Fri Oct 30 12:53:44 2015 +0100
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 05a0c05..b2e5295 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 4ec0208..8295dc0 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 641e295..5b1d9ae 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]