Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3584)

Unified Diff: chrome/browser/gtk/browser_toolbar_gtk.cc

Issue 159754: GTK Themes: Fix painting issues where GTK theme engine was painting over buttons. (Closed)
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_toolbar_gtk.cc
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc
index f10d6059570e110d15cd363622dd3b65780686ee..1e4060bbb15b206c621ee2e8101242b69a5fe4ce 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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698