[gnome-themes-standard] gtk2: fix regression in Chrome/Chromium toolbar drawing



commit f33d2dbcae4f42cd8d3cd5e271ab483d52c43940
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Feb 25 17:18:14 2013 -0500

    gtk2: fix regression in Chrome/Chromium toolbar drawing
    
    When using the native GTK theme, Chromium uses an offscreen entry and
    gtk_style_attach() to draw its background on the GtkHBox of the location
    entry.
    This won't take into account the base color of the GtkEntry itself, so
    we have to special case the offscreen entry and use a solid background
    for it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694661

 .../gtk-2.0/Entry/entry-border-fill-plain.png      |  Bin 0 -> 139 bytes
 themes/Adwaita/gtk-2.0/Makefile.am                 |    1 +
 themes/Adwaita/gtk-2.0/gtkrc                       |   48 ++++++++++++++++++++
 3 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/themes/Adwaita/gtk-2.0/Entry/entry-border-fill-plain.png 
b/themes/Adwaita/gtk-2.0/Entry/entry-border-fill-plain.png
new file mode 100644
index 0000000..cc401ea
Binary files /dev/null and b/themes/Adwaita/gtk-2.0/Entry/entry-border-fill-plain.png differ
diff --git a/themes/Adwaita/gtk-2.0/Makefile.am b/themes/Adwaita/gtk-2.0/Makefile.am
index 214ef93..50ca401 100644
--- a/themes/Adwaita/gtk-2.0/Makefile.am
+++ b/themes/Adwaita/gtk-2.0/Makefile.am
@@ -72,6 +72,7 @@ asset_data = \
        Entry/combo-entry-button-disabled.png \
        Entry/combo-entry-button-disabled-rtl.png \
        Entry/entry-border-fill.png \
+       Entry/entry-border-fill-plain.png \
        Entry/entry-border-fill-solid.png \
        Entry/entry-border-bg.png \
        Entry/entry-border-active-bg.png \
diff --git a/themes/Adwaita/gtk-2.0/gtkrc b/themes/Adwaita/gtk-2.0/gtkrc
index 27d3656..2462866 100755
--- a/themes/Adwaita/gtk-2.0/gtkrc
+++ b/themes/Adwaita/gtk-2.0/gtkrc
@@ -1700,6 +1700,50 @@ style "libreoffice_entry"
         }
 }
 
+style "standalone_entry"
+{
+        engine "pixmap"
+        {
+        image
+        {
+                function                = FLAT_BOX
+                detail                  = "entry_bg"
+                state                   = NORMAL
+                file                    = "Entry/entry-border-fill-plain.png"
+                stretch                 = TRUE
+                border                  = { 0, 0, 0, 0 }
+        }
+        image
+        {
+                function                = FLAT_BOX
+                detail                  = "entry_bg"
+                state                   = ACTIVE
+                file                    = "Entry/entry-border-fill-plain.png"
+                stretch                 = TRUE
+                border                  = { 0, 0, 0, 0 }
+        }
+       image
+       {
+               function                = SHADOW
+               detail                  = "entry"
+                state                   = NORMAL
+               shadow                  = IN
+               file                    = "Entry/entry-border-bg-solid.png"
+               border                  = { 4, 4, 4, 4 }
+               stretch                 = TRUE
+       }
+        image
+        {
+               function                = SHADOW
+               detail                  = "entry"
+                state                   = ACTIVE
+               file                    = "Entry/entry-border-active-bg-solid.png"
+               border                  = { 4, 4, 4, 4 }
+               stretch                 = TRUE
+        }
+        }
+}
+
 style "notebook"
 {
 
@@ -2330,6 +2374,10 @@ class "ChromeGtkFrame"                                style "chrome-gtk-frame"
 widget_class "*Chrom*Button*"                       style "button"
 widget_class "*<GtkCustomMenu>*<GtkCustomMenuItem>*" style "chrome_menu_item"
 
+# We use this weird selector to target an offscreen entry as created
+# by Chrome/Chromium to derive the style for its toolbar
+widget_class "<GtkEntry>"                            style "standalone_entry"
+
 # Eclipse/SWT
 widget "gtk-tooltips*"                         style "eclipse-tooltips"
 widget "*swt-toolbar-flat"             style "null"


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