summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2013-02-25 17:18:14 -0500
committerCosimo Cecchi <cosimoc@gnome.org>2013-02-25 17:26:52 -0500
commitf33d2dbcae4f42cd8d3cd5e271ab483d52c43940 (patch)
tree0c3b53b36697dea4fe487f2ac948c60532637003
parentc9d21d9963c6c3fc7104ff3521eeab37cc57b974 (diff)
downloadgnome-themes-standard-f33d2dbcae4f42cd8d3cd5e271ab483d52c43940.tar.gz
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
-rw-r--r--themes/Adwaita/gtk-2.0/Entry/entry-border-fill-plain.pngbin0 -> 139 bytes
-rw-r--r--themes/Adwaita/gtk-2.0/Makefile.am1
-rwxr-xr-xthemes/Adwaita/gtk-2.0/gtkrc48
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 00000000..cc401ea5
--- /dev/null
+++ b/themes/Adwaita/gtk-2.0/Entry/entry-border-fill-plain.png
Binary files differ
diff --git a/themes/Adwaita/gtk-2.0/Makefile.am b/themes/Adwaita/gtk-2.0/Makefile.am
index 214ef93e..50ca4014 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 27d36561..2462866b 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"