[gnome-themes-standard] Fix switch and scale background and border



commit 804558d8e11092a2460bfc7926fde1026533956b
Author: William Jon McCann <william jon mccann gmail com>
Date:   Tue May 6 16:51:52 2014 -0400

    Fix switch and scale background and border

 themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css |   51 +--------
 themes/Adwaita/gtk-3.0/gtk-widgets.css             |  127 ++++++++++++++++----
 2 files changed, 104 insertions(+), 74 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css 
b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
index c82c687..c0b3b3e 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
@@ -22,11 +22,7 @@
 .toolbar .button.raised:active,
 .toolbar .raised .button:active,
 .toolbar .button.raised:active:hover,
-.toolbar .raised .button:active:hover,
-.trough,
-.trough.highlight,
-.trough row,
-.trough row:hover {
+.toolbar .raised .button:active:hover {
     box-shadow: inset 0 1px 1px alpha(black, 0.1);
     /*  background-color: mix(@borders, @theme_bg_color, 0.5); */
     background-image: linear-gradient(to bottom,
@@ -201,51 +197,6 @@ column-header .button:insensitive:backdrop,
     background-color: @unfocused_dark_bg;
 }
 
-.scale.trough {
-    background-image: linear-gradient(to bottom,
-                                      @scale_trough_bg_a,
-                                      @scale_trough_bg_b
-                                      );
-}
-
-.scale.trough.vertical {
-    background-image: linear-gradient(to right,
-                                      @scale_trough_bg_a,
-                                      @scale_trough_bg_b
-                                      );
-}
-
-/* Active switch background*/
-GtkSwitch.trough:active,
-.scale.progressbar {
-    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 20%,
-                                      @switch_trough_active_bg_c
-                                      );
-    background-color: transparent;
-}
-
-GtkSwitch.trough:backdrop {
-    background-color: @theme_unfocused_bg_color; /* FIXME */
-    background-image: none;
-}
-
-GtkSwitch.trough:active:backdrop {
-    background-color: @unfocused_borders;
-    background-image: none;
-}
-
-.scale.progressbar.vertical {
-    background-image: linear-gradient(to right,
-                                      @switch_trough_active_bg_a,
-                                      @switch_trough_active_bg_b 20%,
-                                      @switch_trough_active_bg_c
-                                      );
-    background-color: transparent;
-}
-
 /* Progressbar backgrounds */
 
 .progressbar,
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 0132910..b33e001 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -850,6 +850,70 @@ GtkColorButton.button {
     padding: 1px 20px;
 }
 
+/***********
+ * Troughs *
+ ***********/
+
+.trough,
+.trough:active:insensitive,
+.trough.highlight {
+    border-radius: 3.5px;
+    box-shadow: inset .5px .5px @borders,
+                inset -.5px .5px @borders,
+                inset .5px -.5px @borders,
+                inset -.5px -.5px @borders;
+    border-image: none;
+    border-width: 0px 0px 1px;
+    border-radius: 3.5px;
+    border-style: solid;
+    border-color: alpha(white, 0.5);
+    background-image: linear-gradient(to bottom,
+                                  @button_active_gradient_color_a,
+                                  @button_active_gradient_color_b 20%,
+                                  @button_active_gradient_color_c
+                                  );
+}
+
+.trough:active,
+.trough:active:hover {
+    box-shadow: inset .5px .5px @theme_selected_bg_color,
+                inset -.5px .5px @theme_selected_bg_color,
+                inset .5px -.5px @theme_selected_bg_color,
+                inset -.5px -.5px @theme_selected_bg_color;
+    border-image: none;
+    border-width: 0px 0px 1px;
+    border-radius: 3.5px;
+    border-style: solid;
+    border-color: alpha(white, 0.5);
+}
+
+.trough:backdrop {
+    border-image: none;
+    border-radius: 3.5px;
+    border-width: 0 0 1px;
+    border-style: solid;
+    border-color: transparent;
+}
+
+/* for progressbars in cell renderers */
+.trough row,
+.trough row:hover {
+    padding: 0;
+    background-image: linear-gradient(to bottom,
+                                  @button_active_gradient_color_a,
+                                  @button_active_gradient_color_b 20%,
+                                  @button_active_gradient_color_c
+                                  );
+}
+
+.trough row:selected,
+.trough row:selected:focus {
+    background-image: linear-gradient(to bottom,
+                                      mix(@trough_bg_color_a, @theme_selected_bg_color, 0.25),
+                                      mix(@trough_bg_color_b, @theme_selected_bg_color, 0.25)
+                                      );
+}
+
 /****************
  * Progress bar *
  ****************/
@@ -888,24 +952,6 @@ GtkProgressBar {
     box-shadow: none;
 }
 
-.trough,
-.trough.highlight {
-    border-radius: 3.5px;
-}
-
-/* for progressbars in cell renderers */
-.trough row {
-    padding: 0;
-}
-
-.trough row:selected,
-.trough row:selected:focus {
-    background-image: linear-gradient(to bottom,
-                                      mix(@trough_bg_color_a, @theme_selected_bg_color, 0.25),
-                                      mix(@trough_bg_color_b, @theme_selected_bg_color, 0.25)
-                                      );
-}
-
 GtkProgressBar:backdrop,
 GtkProgressBar.vertical:backdrop,
 .trough row:backdrop,
@@ -1079,10 +1125,18 @@ GtkLevelBar.vertical {
 
 .scale.trough {
     margin: 8px 0;
+    background-image: linear-gradient(to bottom,
+                                      @scale_trough_bg_a,
+                                      @scale_trough_bg_b
+                                      );
 }
 
 .scale.trough.vertical {
     margin: 0 8px;
+    background-image: linear-gradient(to right,
+                                      @scale_trough_bg_a,
+                                      @scale_trough_bg_b
+                                      );
 }
 
 .scale.trough,
@@ -1126,7 +1180,23 @@ GtkLevelBar.vertical {
 }
 
 .scale.progressbar {
-    background-color: @scale_progress_fill;
+    color: @switch_trough_active_color;
+    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 20%,
+                                      @switch_trough_active_bg_c
+                                      );
+    background-color: transparent;
+}
+
+.scale.progressbar.vertical {
+    background-image: linear-gradient(to right,
+                                      @switch_trough_active_bg_a,
+                                      @switch_trough_active_bg_b 20%,
+                                      @switch_trough_active_bg_c
+                                      );
+    background-color: transparent;
 }
 
 .scale.progressbar:backdrop {
@@ -1236,8 +1306,6 @@ GtkComboBox.combobox-entry .button {
 .inline-toolbar.toolbar.vertical .button:active,
 .inline-toolbar.toolbar.vertical .button:insensitive,
 .inline-toolbar.toolbar.vertical .button.default:insensitive,
-.trough,
-.trough:active:insensitive,
 .titlebar .titlebutton:hover,
 .titlebar .titlebutton:active {
     box-shadow: inset .5px .5px @borders,
@@ -1253,8 +1321,7 @@ GtkComboBox.combobox-entry .button {
 
 /* focused button borders */
 .button.default:active,
-.inline-toolbar.toolbar.vertical .button.default:active,
-.trough:active {
+.inline-toolbar.toolbar.vertical .button.default:active {
     box-shadow: inset .5px .5px @theme_selected_bg_color,
                 inset -.5px .5px @theme_selected_bg_color,
                 inset .5px -.5px @theme_selected_bg_color,
@@ -1269,7 +1336,6 @@ GtkComboBox.combobox-entry .button {
 /* unfocused window: generic button borders */
 .button:backdrop,
 .spinbutton.vertical .button:backdrop,
-.trough:backdrop,
 .inline-toolbar.toolbar.vertical .button:backdrop,
 .inline-toolbar.toolbar.vertical .button:backdrop:insensitive,
 .inline-toolbar.toolbar.vertical .button:backdrop:active,
@@ -3807,6 +3873,15 @@ GtkSwitch.trough:active {
     color: @switch_trough_active_color;
 }
 
+GtkSwitch.trough:active {
+    background-image: linear-gradient(to bottom,
+                                      @switch_trough_active_bg_a,
+                                      @switch_trough_active_bg_b 20%,
+                                      @switch_trough_active_bg_c
+                                      );
+    background-color: transparent;
+}
+
 GtkSwitch.trough:insensitive {
     background-image: none;
     background-color: @insensitive_bg_color;
@@ -3814,10 +3889,14 @@ GtkSwitch.trough:insensitive {
 }
 
 GtkSwitch.trough:backdrop {
+    background-color: @theme_unfocused_bg_color; /* FIXME */
+    background-image: none;
     color: @theme_unfocused_fg_color;
 }
 
 GtkSwitch.trough:active:backdrop {
+    background-color: @unfocused_borders;
+    background-image: none;
     color: @theme_unfocused_bg_color;
 }
 


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