[gnome-themes-standard] Improve the look of ON switch



commit d59efb8fa989e168360f3ec85841a18a964944f4
Author: Nikita Churaev <lamefun x0r gmail com>
Date:   Mon May 5 15:41:18 2014 +0400

    Improve the look of ON switch
    
    The through is now flatter, and the slider's border is now transparent black instead of gray, so it 
doesn't look odd on blue background.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729558

 themes/Adwaita/gtk-3.0/gtk-main-dark.css           |    5 +++--
 themes/Adwaita/gtk-3.0/gtk-main.css                |    5 +++--
 themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css |    6 ++++--
 themes/Adwaita/gtk-3.0/gtk-widgets.css             |    2 +-
 4 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-main-dark.css b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
index d5c6469..8b467ae 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
@@ -72,8 +72,9 @@
 
 @define-color switch_slider_color shade(@theme_bg_color, 0.9);
 @define-color switch_trough_active_color @theme_text_color;
- define-color switch_trough_active_bg_a shade(@theme_selected_bg_color, 0.6);
- define-color switch_trough_active_bg_b @theme_selected_bg_color;
+ define-color switch_trough_active_bg_a shade(@theme_selected_bg_color, 0.86);
+ define-color switch_trough_active_bg_b shade(@theme_selected_bg_color, 1.04);
+ define-color switch_trough_active_bg_c shade(@theme_selected_bg_color, 1.12);
 
 @define-color progressbar_background_a shade(@theme_selected_bg_color, 1.15);
 @define-color progressbar_background_b shade(@theme_selected_bg_color, 0.8);
diff --git a/themes/Adwaita/gtk-3.0/gtk-main.css b/themes/Adwaita/gtk-3.0/gtk-main.css
index 17781e8..a815a7e 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main.css
@@ -72,8 +72,9 @@
 
 @define-color switch_slider_color #eeeeec;
 @define-color switch_trough_active_color @theme_base_color;
- define-color switch_trough_active_bg_a shade(@theme_selected_bg_color, 1.2);
- define-color switch_trough_active_bg_b shade(@theme_selected_bg_color, 1.35);
+ define-color switch_trough_active_bg_a shade(@theme_selected_bg_color, 1.17);
+ define-color switch_trough_active_bg_b shade(@theme_selected_bg_color, 1.22);
+ define-color switch_trough_active_bg_c shade(@theme_selected_bg_color, 1.34);
 
 @define-color progressbar_background_a #76b0ec;
 @define-color progressbar_background_b #1f72c6;
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css 
b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
index a7cdb89..ce4f051 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
@@ -238,7 +238,8 @@ GtkSwitch.trough:active,
     box-shadow: inset 0 1px 1px alpha(black, 0.1);
     background-image: linear-gradient(to bottom,
                                       @switch_trough_active_bg_a,
-                                      @switch_trough_active_bg_b
+                                      @switch_trough_active_bg_b 20%,
+                                      @switch_trough_active_bg_c
                                       );
     background-color: transparent;
 }
@@ -256,7 +257,8 @@ GtkSwitch.trough:active:backdrop {
 .scale.progressbar.vertical {
     background-image: linear-gradient(to right,
                                       @switch_trough_active_bg_a,
-                                      @switch_trough_active_bg_b
+                                      @switch_trough_active_bg_b 20%,
+                                      @switch_trough_active_bg_c
                                       );
     background-color: transparent;
 }
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 836f898..7a06cc1 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -3727,7 +3727,7 @@ GtkSwitch.slider {
     border-width: 1px;
     border-radius: 2px;
     border-style: solid;
-    border-color: mix (@borders, @theme_text_color, 0.4);
+    border-color: alpha (black, 0.4);
 
     box-shadow: inset 0 -1px alpha(white, 0.9), inset 0 1px @theme_base_color, inset 0 2px alpha(@borders, 
0.15);
 


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