[gtk+] Adwaita: flatten the switch base



commit 8394317cc23ee96c9d5f4bbb105d2074bd158187
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Sat Apr 16 13:41:32 2016 +0200

    Adwaita: flatten the switch base

 gtk/theme/Adwaita/_common.scss           |   19 +++++--------------
 gtk/theme/Adwaita/gtk-contained-dark.css |   16 ++++------------
 gtk/theme/Adwaita/gtk-contained.css      |   16 ++++------------
 3 files changed, 13 insertions(+), 38 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 6c8bdc6..d0deea3 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2446,22 +2446,18 @@ switch {
   font-weight: bold;
   font-size: smaller;
   outline-offset: -4px;
-  box-shadow: inset 0 1px transparentize(black, 0.9), // needs to be set here
-              _widget_edge(transparent);              // otherwise it gets
-                                                      // clipped
+
   // similar to the .scale
   border: 1px solid $borders_color;
   border-radius: 3px;
   color: $fg_color;
-  background-image: linear-gradient(to bottom, mix($bg_color, $borders_color, 60%));
+  background-color: $dark_fill;
   text-shadow: 0 1px transparentize(black, 0.9);
 
   &:checked {
-    color: white;
+    color: $selected_fg_color;
     border-color: $selected_borders_color;
     background-color: $selected_bg_color;
-    background-image: none;
-    box-shadow: _widget_edge(transparent);
     text-shadow: 0 1px transparentize($selected_borders_color, 0.5),
                  0 0 2px transparentize(white, 0.4);
   }
@@ -2469,17 +2465,14 @@ switch {
   &:disabled {
     color: $insensitive_fg_color;
     border-color: $borders_color;
-    background-image: none;
     background-color: $insensitive_bg_color;
-    box-shadow: _widget_edge(transparent);
     text-shadow: none;
   }
 
   &:backdrop {
     color: $backdrop_fg_color;
     border-color: $backdrop_borders_color;
-    background-image: linear-gradient(to bottom, $backdrop_dark_fill);
-    box-shadow: none;
+    background-color: $backdrop_dark_fill;
     text-shadow: none;
     transition: $backdrop_transition;
 
@@ -2487,15 +2480,13 @@ switch {
       @if $variant == 'light' { color: $backdrop_bg_color; }
       border-color: if($variant == 'light', $selected_bg_color,
                                             $selected_borders_color);
-      background-image: linear-gradient(to bottom, $selected_bg_color);
-      box-shadow: none;
+      background-color: $selected_bg_color;
     }
   }
 
   &:disabled {
     color: $backdrop_insensitive_color;
     border-color: $backdrop_borders_color;
-    background-image: none;
     background-color: $insensitive_bg_color;
   }
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 46f7f37..fa43fff 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2593,41 +2593,33 @@ switch {
   font-weight: bold;
   font-size: smaller;
   outline-offset: -4px;
-  box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px transparent;
   border: 1px solid #1c1f1f;
   border-radius: 3px;
   color: #eeeeec;
-  background-image: linear-gradient(to bottom, #2d3232);
+  background-color: #2f3434;
   text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
   switch:checked {
-    color: white;
+    color: #ffffff;
     border-color: #0f2b48;
     background-color: #215d9c;
-    background-image: none;
-    box-shadow: 0 1px transparent;
     text-shadow: 0 1px rgba(15, 43, 72, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); }
   switch:disabled {
     color: #949796;
     border-color: #1c1f1f;
-    background-image: none;
     background-color: #333636;
-    box-shadow: 0 1px transparent;
     text-shadow: none; }
   switch:backdrop {
     color: #949796;
     border-color: #1f2222;
-    background-image: linear-gradient(to bottom, #303535);
-    box-shadow: none;
+    background-color: #303535;
     text-shadow: none;
     transition: 200ms ease-out; }
     switch:backdrop:checked {
       border-color: #0f2b48;
-      background-image: linear-gradient(to bottom, #215d9c);
-      box-shadow: none; }
+      background-color: #215d9c; }
   switch:disabled {
     color: #5d6767;
     border-color: #1f2222;
-    background-image: none;
     background-color: #333636; }
   switch slider {
     margin: -1px;
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 8705244..30129cd 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2606,42 +2606,34 @@ switch {
   font-weight: bold;
   font-size: smaller;
   outline-offset: -4px;
-  box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px transparent;
   border: 1px solid #9d9d99;
   border-radius: 3px;
   color: #2e3436;
-  background-image: linear-gradient(to bottom, #cacac8);
+  background-color: #cececc;
   text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
   switch:checked {
-    color: white;
+    color: #ffffff;
     border-color: #184472;
     background-color: #4a90d9;
-    background-image: none;
-    box-shadow: 0 1px transparent;
     text-shadow: 0 1px rgba(24, 68, 114, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); }
   switch:disabled {
     color: #8b8e8f;
     border-color: #9d9d99;
-    background-image: none;
     background-color: #f1f1f1;
-    box-shadow: 0 1px transparent;
     text-shadow: none; }
   switch:backdrop {
     color: #8b8e8f;
     border-color: #a5a5a1;
-    background-image: linear-gradient(to bottom, #d1d1cf);
-    box-shadow: none;
+    background-color: #d1d1cf;
     text-shadow: none;
     transition: 200ms ease-out; }
     switch:backdrop:checked {
       color: #e8e8e7;
       border-color: #4a90d9;
-      background-image: linear-gradient(to bottom, #4a90d9);
-      box-shadow: none; }
+      background-color: #4a90d9; }
   switch:disabled {
     color: #c3c3c0;
     border-color: #a5a5a1;
-    background-image: none;
     background-color: #f1f1f1; }
   switch slider {
     margin: -1px;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]