[gtk+] Adwaita: added active state to the switch slider



commit abe36dc9cd03e631564721c6f3e9bc6484b2dfe9
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Tue Jun 24 10:38:03 2014 +0200

    Adwaita: added active state to the switch slider

 gtk/resources/theme/Adwaita/_common.scss           |    7 +++++++
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   10 ++++++++++
 gtk/resources/theme/Adwaita/gtk-contained.css      |   10 ++++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 35c2ac1..b60b9c9 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -1159,6 +1159,13 @@ GtkSwitch {
                                  transparentize(white,0.85)),
                   inset 0 -2px transparentize($bg_color,0.4),
                   inset 0 -1px mix($bg_color,$borders_color,50%);
+      &:hover {
+        @include button(hover, $noedge: true);
+        box-shadow: inset 0 1px if($variant=='light', white,
+                                   transparentize(white,0.85)),
+                    inset 0 -2px transparentize($bg_color,0.4),
+                    inset 0 -1px mix($bg_color,$borders_color,50%);
+      }
       &:active { border: 1px solid $selected_borders_color; }
       &:insensitive { @include button(insensitive, $noedge: true); }
       &:backdrop { @include button(backdrop); }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index dc1e65a..10be433 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1321,6 +1321,16 @@ GtkSwitch {
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px 
#2a2f2f; }
+    GtkSwitch.slider:hover {
+      border-width: 1px;
+      border-style: solid;
+      color: #eeeeec;
+      border-color: #1c1f1f;
+      background-image: linear-gradient(to bottom, #5b6464, #434a4a 40%, #393f3f);
+      text-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+      icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px 
#2a2f2f; }
     GtkSwitch.slider:active {
       border: 1px solid #0f2b48; }
     GtkSwitch.slider:insensitive {
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 8df98e0..564ed3b 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1321,6 +1321,16 @@ GtkSwitch {
     icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     box-shadow: inset 0 1px white;
     box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
+    GtkSwitch.slider:hover {
+      border-width: 1px;
+      border-style: solid;
+      color: #2e3436;
+      border-color: #a1a1a1;
+      background-image: linear-gradient(to bottom, white, #f7f7f7 40%, #ededed);
+      text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      box-shadow: inset 0 1px white;
+      box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
     GtkSwitch.slider:active {
       border: 1px solid #184472; }
     GtkSwitch.slider:insensitive {


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