[gnome-themes-standard] Improve styling support for header bars



commit 4b190c7805720b55e3103ee435e1cd13102d9d50
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Feb 19 19:55:56 2013 -0500

    Improve styling support for header bars
    
    Support setting selection-mode on a GdHeaderBar, and using
    GdHeaderButtons inside it.

 themes/Adwaita/gtk-3.0/gtk-widgets.css |   60 +++++++++++++++++++++++++++----
 1 files changed, 52 insertions(+), 8 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index f821350..a4b1df3 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -2514,19 +2514,29 @@ GtkCheckButton:selected:focus {
  * Header bars *
  ***************/
 .header-bar {
-    border-width: 0 0 2px;
+    border-width: 0 0 1px;
     border-style: solid;
-    border-image: linear-gradient(to top,
-                                  shade(@borders, 0.90),
-                                  shade(@borders, 0.90) 1px,
-                                  alpha(black, 0.07) 1px) 0 0 2;
+    border-color: shade(@borders, 0.90);
+
+    box-shadow: inset 0 -1px shade(@borders, 1.30);
+    background-color: @theme_bg_color;
 }
 
 .header-bar:backdrop {
     border-image: linear-gradient(to top,
                                   @unfocused_borders,
                                   @unfocused_borders 1px,
-                                  transparent 1px) 0 0 2;
+                                  @theme_unfocused_bg_color 1px) 0 0 2;
+
+    background-color: @theme_unfocused_bg_color;
+}
+
+.header-bar .button.text-button {
+    padding: 2px 16px;
+}
+
+.header-bar .button.image-button {
+    padding: 5px 4px 4px 5px;
 }
 
 /********************
@@ -3071,6 +3081,7 @@ GtkProgressBar.osd.progressbar {
 /**************************
  * Selection Mode classes *
  **************************/
+.selection-mode.header-bar,
 .selection-mode.toolbar {
     color: @selection_toolbar_fg;
     background-image: linear-gradient(to bottom,
@@ -3082,10 +3093,21 @@ GtkProgressBar.osd.progressbar {
     border-style: solid;
 
     text-shadow: 0 1px @selection_toolbar_shadow;
+}
+
+.selection-mode.header-bar {
+    border-top-color: @selection_toolbar_bg_a;
+    border-bottom-color: shade(@selection_toolbar_bg_b, 0.75);
+    border-width: 1px 0;
+    box-shadow: inset 0 -1px shade(@selection_toolbar_bg_b, 0.90);
+}
+
+.selection-mode.toolbar {
     padding: 6px;
 }
 
 /* regular button */
+.selection-mode.header-bar .button,
 .selection-mode.toolbar .button,
 .selection-mode.toolbar GtkToolButton .button {
     background-image: linear-gradient(to bottom,
@@ -3101,6 +3123,7 @@ GtkProgressBar.osd.progressbar {
     color: @selection_toolbar_button_fg;
 }
 
+.selection-mode.header-bar .button:hover,
 .selection-mode.toolbar .button:hover,
 .selection-mode.toolbar GtkToolButton .button:hover {
     background-image: linear-gradient(to bottom,
@@ -3108,6 +3131,8 @@ GtkProgressBar.osd.progressbar {
                                       shade(@selection_toolbar_button_b, 1.02));
 }
 
+.selection-mode.header-bar .button:active,
+.selection-mode.header-bar .button:hover:active,
 .selection-mode.toolbar .button:active,
 .selection-mode.toolbar .button:hover:active,
 .selection-mode.toolbar GtkToolButton .button:active,
@@ -3118,6 +3143,7 @@ GtkProgressBar.osd.progressbar {
     box-shadow: none;
 }
 
+.selection-mode.header-bar .button:backdrop,
 .selection-mode.toolbar .button:backdrop,
 .selection-mode.toolbar GtkToolButton .button:backdrop {
     text-shadow: none;
@@ -3131,20 +3157,24 @@ GtkProgressBar.osd.progressbar {
     color: @selection_toolbar_button_fg;
 }
 
+.selection-mode.header-bar .button *:active,
 .selection-mode.toolbar .button *:active,
 .selection-mode.toolbar GtkToolButton .button *:active {
     color: @selection_toolbar_button_fg;
 }
 
+.selection-mode.header-bar .button *,
+.selection-mode.header-bar .button *:active,
 .selection-mode.toolbar .button *,
-.selection-mode.toolbar GtkToolButton .button *,
 .selection-mode.toolbar .button *:active,
+.selection-mode.toolbar GtkToolButton .button *,
 .selection-mode.toolbar GtkToolButton .button *:active {
     text-shadow: 0 1px @selection_toolbar_button_shadow;
     icon-shadow: 0 1px @selection_toolbar_button_shadow;
 }
 
 /* suggested button */
+.selection-mode.header-bar .suggested-action.button,
 .selection-mode.toolbar .suggested-action.button,
 .selection-mode.toolbar GtkToolButton.suggested-action .button {
     background-image: linear-gradient(to bottom,
@@ -3161,6 +3191,7 @@ GtkProgressBar.osd.progressbar {
     color: @theme_text_color;
 }
 
+.selection-mode.header-bar .suggested-action.button:hover,
 .selection-mode.toolbar .suggested-action.button:hover,
 .selection-mode.toolbar GtkToolButton.suggested-action .button:hover {
     background-image: linear-gradient(to bottom,
@@ -3169,6 +3200,8 @@ GtkProgressBar.osd.progressbar {
                                       @selection_toolbar_suggested_button_c);
 }
 
+.selection-mode.header-bar .suggested-action.button:active,
+.selection-mode.header-bar .suggested-action.button:hover:active,
 .selection-mode.toolbar .suggested-action.button:active,
 .selection-mode.toolbar .suggested-action.button:hover:active,
 .selection-mode.toolbar GtkToolButton.suggested-action .button:active,
@@ -3180,6 +3213,7 @@ GtkProgressBar.osd.progressbar {
     box-shadow: none;
 }
 
+.selection-mode.header-bar .suggested-action.button:backdrop,
 .selection-mode.toolbar .suggested-action.button:backdrop,
 .selection-mode.toolbar GtkToolButton.suggested-action .button:backdrop {
     text-shadow: none;
@@ -3193,20 +3227,24 @@ GtkProgressBar.osd.progressbar {
     color: @theme_unfocused_fg_color;
 }
 
+.selection-mode.header-bar .suggested-action.button *:active,
 .selection-mode.toolbar .suggested-action.button *:active,
 .selection-mode.toolbar GtkToolButton.suggested-action *:active {
     color: @theme_text_color;
 }
 
+.selection-mode.header-bar .suggested-action.button *,
+.selection-mode.header-bar .suggested-action.button *:active,
 .selection-mode.toolbar .suggested-action.button *,
-.selection-mode.toolbar GtkToolButton.suggested-action .button *,
 .selection-mode.toolbar .suggested-action.button *:active,
+.selection-mode.toolbar GtkToolButton.suggested-action .button *,
 .selection-mode.toolbar GtkToolButton.suggested-action *:active {
     text-shadow: 0 1px @button_text_shadow;
     icon-shadow: 0 1px @button_text_shadow;
 }
 
 /* menu button */
+.selection-mode.header-bar .selection-menu.button,
 .selection-mode.toolbar .selection-menu.button {
     background-image: none;
     border-image: none;
@@ -3221,17 +3259,20 @@ GtkProgressBar.osd.progressbar {
     color: @selection_menu_fg;
 }
 
+.selection-mode.header-bar .selection-menu.button:backdrop,
 .selection-mode.toolbar .selection-menu.button:backdrop {
     background-color: transparent;
     color: @selection_menu_fg;
 }
 
+.selection-mode.header-bar .selection-menu.button:hover,
 .selection-mode.toolbar .selection-menu.button:hover,
 .selection-mode.toolbar .selection-menu.button .dim-label:hover {
     background-color: transparent;
     color: @selection_menu_hover;
 }
 
+.selection-mode.header-bar .selection-menu.button:active,
 .selection-mode.toolbar .selection-menu.button:active {
     border-color: transparent;
     border-radius: 3px;
@@ -3240,14 +3281,17 @@ GtkProgressBar.osd.progressbar {
     background-color: transparent;
 }
 
+.selection-mode.header-bar .selection-menu.button *:active,
 .selection-mode.toolbar .selection-menu.button *:active {
     color: @selection_menu_active;
 }
 
+.selection-mode.header-bar .selection-menu.button *,
 .selection-mode.toolbar .selection-menu.button * {
     text-shadow: 0 1px @selection_toolbar_shadow;
 }
 
+.selection-mode.header-bar .selection-menu.button .menuitem *,
 .selection-mode.toolbar .selection-menu.button .menuitem * {
     text-shadow: none;
 }


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