diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 02:23:33 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 02:23:33 +0000 |
commit | 877591d6f4d26e8725ab72f3bce38819d1640bf4 (patch) | |
tree | 9060d38852471965df57ffec078438c7f42469f5 /chrome | |
parent | 10882030ebab866d6ecb495480b371fbc0536ab7 (diff) | |
download | chromium_src-877591d6f4d26e8725ab72f3bce38819d1640bf4.zip chromium_src-877591d6f4d26e8725ab72f3bce38819d1640bf4.tar.gz chromium_src-877591d6f4d26e8725ab72f3bce38819d1640bf4.tar.bz2 |
GTK Themes: Fix painting issues where GTK theme engine was painting over buttons.
So it looks like some themeing engines in distros more recent than Hardy paint
random boxes of the default background if you don't pass an explicit clip area
to gtk_paint_shadow().
http://crbug.com/18129
Review URL: http://codereview.chromium.org/159754
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc index f10d605..1e4060b 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_toolbar_gtk.cc @@ -546,12 +546,12 @@ gboolean BrowserToolbarGtk::OnLocationHboxExpose(GtkWidget* location_hbox, right = toolbar->star_->widget(); } - gint x = left->allocation.x; - gint y = left->allocation.y; - gint width = (right->allocation.x - left->allocation.x) + - right->allocation.width; - gint height = (right->allocation.y - left->allocation.y) + - right->allocation.height; + GdkRectangle rec = { + left->allocation.x, + left->allocation.y, + (right->allocation.x - left->allocation.x) + right->allocation.width, + (right->allocation.y - left->allocation.y) + right->allocation.height + }; // Make sure our off screen entry has the correct base color if we're in // secure mode. @@ -572,20 +572,20 @@ gboolean BrowserToolbarGtk::OnLocationHboxExpose(GtkWidget* location_hbox, // We're using GTK rendering; draw a GTK entry widget onto the background. gtk_paint_shadow(our_style, location_hbox->window, - GTK_STATE_NORMAL, GTK_SHADOW_IN, NULL, + GTK_STATE_NORMAL, GTK_SHADOW_IN, &rec, location_hbox, "entry", - x, y, width, height); + rec.x, rec.y, rec.width, rec.height); // Draw the interior background (not all themes draw the entry background // above; this is a noop on themes that do). gint xborder = our_style->xthickness; gint yborder = our_style->ythickness; gtk_paint_flat_box(our_style, location_hbox->window, - GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, + GTK_STATE_NORMAL, GTK_SHADOW_NONE, &rec, location_hbox, "entry_bg", - x + xborder, y + yborder, - width - 2 * xborder, - height - 2 * yborder); + rec.x + xborder, rec.y + yborder, + rec.width - 2 * xborder, + rec.height - 2 * yborder); g_object_unref(our_style); } |