[gtk+] Adwaita: saner backdrop switch for the dark variant



commit cf7a5401b23f9b0020bb86aafacbd5c487e4cfbe
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Aug 13 16:36:15 2014 +0200

    Adwaita: saner backdrop switch for the dark variant

 gtk/resources/theme/Adwaita/_common.scss           |   19 ++++++++++++-------
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   13 ++++++-------
 gtk/resources/theme/Adwaita/gtk-contained.css      |    8 ++++----
 3 files changed, 22 insertions(+), 18 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index c0699ea..bef4864 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -1530,7 +1530,8 @@ GtkSwitch {
     border-style: solid;
     border-radius: 3px;
     border-color: $borders_color;
-    background-color: mix($bg_color,$borders_color,60%);
+    background-image: linear-gradient(to bottom,
+                                      mix($bg_color,$borders_color,60%));
     text-shadow: 0 1px transparentize(black, 0.9);
     &:active {
       @include progressbar_fill;
@@ -1552,19 +1553,20 @@ GtkSwitch {
     &:backdrop {
       color: $backdrop_fg_color;
       border-color: $backdrop_borders_color;
-      background-image: none;
-      background-color: $backdrop_dark_fill;
+      background-image: linear-gradient(to bottom, $backdrop_dark_fill);
       box-shadow: none;
       text-shadow: none;
       &:active {
-        color: $backdrop_bg_color;
-        border-color: $selected_bg_color;
-        background-color: $selected_bg_color;
+        @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;
       }
       &:insensitive {
         color: $backdrop_insensitive_color;
         border-color: $backdrop_borders_color;
+        background-image: none;
         background-color: $insensitive_bg_color;
       }
     }
@@ -1591,7 +1593,10 @@ GtkSwitch {
     &:active { border: 1px solid $selected_borders_color; }
     &:insensitive { @include button(insensitive, $noedge: true); }
     &:backdrop { @include button(backdrop);
-      &:active{ border-color: $selected_bg_color; }
+      &:active{
+        border-color: if($variant == 'light', $selected_bg_color,
+                                              $selected_borders_color);
+      }
       &:insensitive {
         @include button(backdrop-insensitive);
       }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 03ff51b..44f93c3 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1603,7 +1603,7 @@ GtkSwitch {
     border-style: solid;
     border-radius: 3px;
     border-color: #1c1f1f;
-    background-color: #2d3232;
+    background-image: linear-gradient(to bottom, #2d3232);
     text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
     GtkSwitch.trough:active {
       background-image: linear-gradient(to bottom, #215d9c 2px, #266cb5);
@@ -1621,18 +1621,17 @@ GtkSwitch {
     GtkSwitch.trough:backdrop {
       color: #c9cbc9;
       border-color: #1e2222;
-      background-image: none;
-      background-color: #2f3434;
+      background-image: linear-gradient(to bottom, #2f3434);
       box-shadow: none;
       text-shadow: none; }
       GtkSwitch.trough:backdrop:active {
-        color: #393f3f;
-        border-color: #215d9c;
-        background-color: #215d9c;
+        border-color: #0f2b48;
+        background-image: linear-gradient(to bottom, #215d9c);
         box-shadow: none; }
       GtkSwitch.trough:backdrop:insensitive {
         color: #5d6767;
         border-color: #1e2222;
+        background-image: none;
         background-color: #323636; }
   .list-row:selected GtkSwitch {
     box-shadow: 0 0 0 1px white; }
@@ -1677,7 +1676,7 @@ GtkSwitch {
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
       GtkSwitch.slider:backdrop:active, .list-row:selected GtkSwitch.slider:backdrop:active {
-        border-color: #215d9c; }
+        border-color: #0f2b48; }
       GtkSwitch.slider:backdrop:insensitive, .list-row:selected GtkSwitch.slider:backdrop:insensitive {
         border-style: solid;
         color: #5d6767;
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 32a30fb..84e31a0 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1597,7 +1597,7 @@ GtkSwitch {
     border-style: solid;
     border-radius: 3px;
     border-color: #a1a1a1;
-    background-color: #cecece;
+    background-image: linear-gradient(to bottom, #cecece);
     text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
     GtkSwitch.trough:active {
       background-image: linear-gradient(to bottom, #4a90d9 2px, #63a0de);
@@ -1615,18 +1615,18 @@ GtkSwitch {
     GtkSwitch.trough:backdrop {
       color: #54595a;
       border-color: #a8a8a8;
-      background-image: none;
-      background-color: #d4d4d4;
+      background-image: linear-gradient(to bottom, #d4d4d4);
       box-shadow: none;
       text-shadow: none; }
       GtkSwitch.trough:backdrop:active {
         color: #ededed;
         border-color: #4a90d9;
-        background-color: #4a90d9;
+        background-image: linear-gradient(to bottom, #4a90d9);
         box-shadow: none; }
       GtkSwitch.trough:backdrop:insensitive {
         color: #c7c7c7;
         border-color: #a8a8a8;
+        background-image: none;
         background-color: #f4f4f4; }
   .list-row:selected GtkSwitch {
     box-shadow: 0 0 0 1px white; }


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