[gnome-themes-standard] Make window buttons look like normal buttons



commit 243c5c6150bd0a428f4d80b1d83c8670e7081837
Author: Nikita Churaev <lamefun x0r gmail com>
Date:   Mon May 5 17:36:01 2014 +0400

    Make window buttons look like normal buttons
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726006

 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             |   31 -----
 themes/Adwaita/metacity-1/metacity-theme-3.xml     |  125 +++-----------------
 5 files changed, 27 insertions(+), 145 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-main-dark.css b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
index 8b467ae..23c07f4 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
@@ -42,8 +42,9 @@
 @define-color button_gradient_color_c shade (@theme_bg_color, 0.8);
 @define-color borders #24282a;
 
- define-color button_active_gradient_color_a shade (@button_gradient_color_b, 0.7);
- define-color button_active_gradient_color_b shade (@button_gradient_color_a, 0.7);
+ define-color button_active_gradient_color_a shade(shade(@borders, 1.25), 0.95);
+ define-color button_active_gradient_color_b shade(shade(@borders, 1.28), 0.95);
+ define-color button_active_gradient_color_c shade(shade(@borders, 1.34), 0.95);
 @define-color button_active_text @theme_text_color;
 @define-color button_active_text_shadow alpha(black, 0.6);
 @define-color button_text_shadow alpha(black, 0.7);
diff --git a/themes/Adwaita/gtk-3.0/gtk-main.css b/themes/Adwaita/gtk-3.0/gtk-main.css
index bde6322..e900a83 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main.css
@@ -42,8 +42,9 @@
 @define-color button_gradient_color_c shade(@theme_bg_color, 0.92);
 @define-color borders #a7aba7;
 
- define-color button_active_gradient_color_a #a2a9a2;
- define-color button_active_gradient_color_b shade (@button_active_gradient_color_a, 0.83);
+ define-color button_active_gradient_color_a shade(shade(@borders, 1.25), 0.95);
+ define-color button_active_gradient_color_b shade(shade(@borders, 1.28), 0.95);
+ define-color button_active_gradient_color_c shade(shade(@borders, 1.34), 0.95);
 @define-color button_active_text @theme_text_color;
 @define-color button_active_text_shadow alpha(white, 0.4);
 @define-color button_text_shadow alpha(white, 0.4);
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css 
b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
index ce4f051..0ab8657 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
@@ -30,9 +30,9 @@
     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,
-                                  shade(@toolbar_gradient_a, 0.95),
-                                  shade(@toolbar_gradient_b, 0.95) 20%,
-                                  shade(@toolbar_gradient_c, 0.95)
+                                  @button_active_gradient_color_a,
+                                  @button_active_gradient_color_b 20%,
+                                  @button_active_gradient_color_c
                                   );
 }
 
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 2655610..187dee9 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -4274,37 +4274,6 @@ GtkPopover .separator {
     border-image: none;
 }
 
-.titlebar .titlebutton:hover {
-    background-image: linear-gradient(to bottom,
-                                      @button_hover_gradient_color_a,
-                                      @button_hover_gradient_color_b);
-}
-
-.titlebar .titlebutton:active {
-    background-image: linear-gradient(to bottom,
-                                      @borders,
-                                      shade(@theme_bg_color, 0.95)
-                                      );
-    color: @theme_selected_fg_color;
-    icon-shadow: none;
-}
-
-.titlebar .right .titlebutton:first-child {
-/*    border-left: 1px solid @menu_separator; */
-}
-
-.titlebar .right .titlebutton:last-child {
-
-}
-
-.titlebar .left .titlebutton:last-child {
-/*    border-right: 1px solid @menu_separator; */
-}
-
-.titlebar .left .titlebutton:first-child {
-
-}
-
 .titlebar .titlebutton:backdrop {
     background-image: none;
     color: @wm_unfocused_title;
diff --git a/themes/Adwaita/metacity-1/metacity-theme-3.xml b/themes/Adwaita/metacity-1/metacity-theme-3.xml
index 3461401..74fd6d0 100644
--- a/themes/Adwaita/metacity-1/metacity-theme-3.xml
+++ b/themes/Adwaita/metacity-1/metacity-theme-3.xml
@@ -20,7 +20,7 @@
 <constant name="C_title_unfocused" value="gtk:custom(wm_unfocused_title,gtk:fg[INSENSITIVE])" />
 <!-- color of the button icons -->
 <constant name="C_icons_focused" value="gtk:custom(wm_title,gtk:fg[NORMAL])" />
-<constant name="C_icons_pressed" value="gtk:text[SELECTED]" />
+<constant name="C_icons_pressed" value="gtk:custom(wm_title,gtk:fg[NORMAL])" />
 <constant name="C_icons_unfocused" value="blend/gtk:text[NORMAL]/gtk:bg[NORMAL]/0.9" />
 <constant name="C_icons_unfocused_prelight" value="blend/gtk:bg[NORMAL]/gtk:fg[NORMAL]/0.3" />
 <constant name="C_icons_unfocused_pressed" value="blend/#000000/gtk:bg[NORMAL]/0.7" />
@@ -293,60 +293,6 @@
                color="C_icons_shadow" />
 </draw_ops>
 
-<draw_ops name="close_glyph_pressed">
-       <line
-               x1="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
-               x2="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow" 
-               color="C_icons_pressed" />
-       <line
-               x1="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               x2="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y2="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow"
-               color="C_icons_pressed" />
-       <line 
-               x1="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+1+D_icons_shrink-D_icons_grow"
-               x2="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow"
-               color="C_icons_pressed" />
-       <line 
-               x1="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               x2="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow"
-               color="C_icons_pressed" />
-       <line 
-               x1="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               x2="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y2="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow"
-               color="C_icons_pressed" />
-       <line 
-               x1="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y1="(height-height%3)/3+1+D_icons_shrink-D_icons_grow"
-               x2="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow"
-               color="C_icons_pressed" />
-</draw_ops>
-
-<draw_ops name="close_glyph_prelight">
-       <line
-               x1="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
-               x2="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow" 
-               color="gtk:text[NORMAL]" />
-       <line
-               x1="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               x2="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y2="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow"
-               color="gtk:text[NORMAL]" />
-       <line 
-               x1="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+1+D_icons_shrink-D_icons_grow"
-               x2="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow"
-               color="gtk:text[NORMAL]" />
-       <line 
-               x1="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               x2="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow"
-               color="gtk:text[NORMAL]" />
-       <line 
-               x1="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               x2="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y2="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow"
-               color="gtk:text[NORMAL]" />
-       <line 
-               x1="width-(width-width%3)/3-1-D_icons_shrink+D_icons_grow" 
y1="(height-height%3)/3+1+D_icons_shrink-D_icons_grow"
-               x2="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y2="height-(height-height%3)/3-1-D_icons_shrink+D_icons_grow"
-               color="gtk:text[NORMAL]" />
-</draw_ops>
-
 <draw_ops name="close_glyph_focused">
        <line
                x1="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y1="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
@@ -377,16 +323,14 @@
 <draw_ops name="close_focused">
        <include name="close_shadow_focused" y="1" />
        <include name="close_glyph_focused" />
-
 </draw_ops>
 
 <draw_ops name="close_focused_pressed">
-       <include name="close_glyph_pressed" y="1" />
+  <include name="close_focused"/>
 </draw_ops>
 
 <draw_ops name="close_focused_prelight">
-       <include name="close_shadow_focused" y="1" />
-       <include name="close_glyph_prelight" />
+  <include name="close_focused"/>
 </draw_ops>
 
 <draw_ops name="close_glyph_unfocused">
@@ -496,28 +440,6 @@
                color="C_icons_focused" />
 </draw_ops>
 
-<draw_ops name="maximize_glyph_pressed">
-       <rectangle 
-               x="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               width="width-2*(width-width%3)/3-1-2*D_icons_shrink+2*D_icons_grow" 
height="height-2*(height-height%3)/3-1-2*D_icons_shrink+2*D_icons_grow" 
-               color="C_icons_pressed" />
-       <rectangle 
-               x="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y="(height-height%3)/3+1+D_icons_shrink-D_icons_grow"
-               width="width-2*(width-width%3)/3-3-2*D_icons_shrink+2*D_icons_grow" 
height="height-2*(height-height%3)/3-3-2*D_icons_shrink+2*D_icons_grow" 
-               color="C_icons_pressed" />
-</draw_ops>
-
-<draw_ops name="maximize_glyph_prelight">
-       <rectangle 
-               x="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y="(height-height%3)/3+D_icons_shrink-D_icons_grow"
-               width="width-2*(width-width%3)/3-1-2*D_icons_shrink+2*D_icons_grow" 
height="height-2*(height-height%3)/3-1-2*D_icons_shrink+2*D_icons_grow" 
-               color="gtk:text[NORMAL]" />
-       <rectangle 
-               x="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y="(height-height%3)/3+1+D_icons_shrink-D_icons_grow"
-               width="width-2*(width-width%3)/3-3-2*D_icons_shrink+2*D_icons_grow" 
height="height-2*(height-height%3)/3-3-2*D_icons_shrink+2*D_icons_grow" 
-               color="gtk:text[NORMAL]" />
-</draw_ops>
-
 <draw_ops name="maximize_shadow_focused">
        <rectangle 
                x="(width-width%3)/3+D_icons_shrink-D_icons_grow" 
y="(height-height%3)/3+D_icons_shrink-D_icons_grow"
@@ -535,12 +457,11 @@
 </draw_ops>
 
 <draw_ops name="maximize_focused_pressed">
-       <include name="maximize_glyph_pressed" y="1" />
+       <include name="maximize_focused" />
 </draw_ops>
 
 <draw_ops name="maximize_focused_prelight">
-       <include name="maximize_shadow_focused" y="1" />
-       <include name="maximize_glyph_prelight" />
+       <include name="maximize_focused" />
 </draw_ops>
 
 <draw_ops name="maximize_glyph_unfocused">
@@ -595,20 +516,6 @@
                color="C_icons_focused" />
 </draw_ops>
 
-<draw_ops name="minimize_glyph_pressed">
-       <rectangle 
-               x="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
-               width="width-2*(width-width%3)/3-2-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
-               color="C_icons_pressed" />
-</draw_ops>
-
-<draw_ops name="minimize_glyph_prelight">
-       <rectangle 
-               x="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
-               width="width-2*(width-width%3)/3-2-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
-               color="gtk:text[NORMAL]" />
-</draw_ops>
-
 <draw_ops name="minimize_shadow_focused">
        <rectangle 
                x="(width-width%3)/3+1+D_icons_shrink-D_icons_grow" 
y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
@@ -622,12 +529,11 @@
 </draw_ops>
 
 <draw_ops name="minimize_focused_pressed">
-       <include name="minimize_glyph_pressed" y="1" />
+       <include name="minimize_focused" />
 </draw_ops>
 
 <draw_ops name="minimize_focused_prelight">
-       <include name="minimize_shadow_focused" y="1" />
-       <include name="minimize_glyph_prelight" />
+       <include name="minimize_focused" />
 </draw_ops>
 
 <draw_ops name="minimize_glyph_unfocused">
@@ -873,14 +779,17 @@
 <constant name="C_button_border" value="blend/#000000/gtk:bg[NORMAL]/0.8" />
 <constant name="C_button_hilight" value="gtk:custom(wm_highlight,blend/gtk:base[NORMAL]/gtk:bg[NORMAL]/0.6)" 
/>
 
+<constant name="C_button_pressed_shadow1" 
value="blend/#000000/gtk:custom(button_active_gradient_color_b,gtk:fg[NORMAL])/0.94" />
+<constant name="C_button_pressed_shadow2" 
value="blend/#000000/gtk:custom(button_active_gradient_color_b,gtk:fg[NORMAL])/0.97" />
+
 <draw_ops name="button_border">
-  <line x1="7" y1="4" x2="width-8" y2="4" color="C_button_border" />
+  <line x1="6" y1="4" x2="width-7" y2="4" color="C_button_border" />
   <arc color="C_button_border" x="width-9" y="4" width="4" height="4" start_angle="0" extent_angle="90"/>  
-  <line x1="width-5" y1="7" x2="width-5" y2="height-8" color="C_button_border" />
+  <line x1="width-5" y1="6" x2="width-5" y2="height-7" color="C_button_border" />
   <arc color="C_button_border" x="width-9" y="height-9" width="4" height="4" start_angle="90" 
extent_angle="90"/>
-  <line x1="width-7" y1="height-5" x2="7" y2="height-5" color="C_button_border" />
+  <line x1="width-6" y1="height-5" x2="6" y2="height-5" color="C_button_border" />
   <arc color="C_button_border" x="4" y="height-9" width="4" height="4" start_angle="180" extent_angle="90"/>
-  <line x1="4" y1="7" x2="4" y2="height-8" color="C_button_border" />
+  <line x1="4" y1="6" x2="4" y2="height-7" color="C_button_border" />
   <arc color="C_button_border" x="4" y="4" width="4" height="4" start_angle="270" extent_angle="90"/>
   <line x1="width-7" y1="height-4" x2="7" y2="height-4" color="C_title_focused_hilight" />
 </draw_ops>
@@ -900,9 +809,11 @@
 
 <draw_ops name="button_fill_pressed"> <!-- button background gradient for pressed status -->
   <gradient type="vertical" x="5" y="5" width="width-10" height="height-10">
-               <color value="gtk:custom(borders,gtk:fg[NORMAL])" />
-               <color value="blend/gtk:custom(theme_bg_color,gtk:fg[NORMAL])/#000000/.05" />
+               <color value="gtk:custom(button_active_gradient_color_b,gtk:fg[NORMAL])" />
+               <color value="gtk:custom(button_active_gradient_color_c,gtk:fg[NORMAL])" />
        </gradient>
+  <line x1="5" y1="5" x2="width-6" y2="5" color="C_button_pressed_shadow1" />
+  <line x1="4" y1="6" x2="width-5" y2="6" color="C_button_pressed_shadow2" />
        <include name="button_border" />
 </draw_ops>
 


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