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

Unified Diff: chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc

Issue 8773025: GTK: More removal of raw GtkWidget->allocation access. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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 | « chrome/browser/tab_contents/tab_contents_view_gtk.cc ('k') | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
index 65083d5530250a6b391c619ba73eebbc79b32dd8..2934bbc08acce3415a0c58760b8b7e205e88d155 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc
@@ -135,14 +135,17 @@ gboolean OnDragIconExpose(GtkWidget* sender,
cairo_paint(cr);
cairo_destroy(cr);
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(sender, &allocation);
+
// Paint the title text.
gfx::CanvasSkiaPaint canvas(event, false);
int text_x = gdk_pixbuf_get_width(data->favicon) + kBarButtonPadding;
- int text_width = sender->allocation.width - text_x;
+ int text_width = allocation.width - text_x;
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont);
canvas.DrawStringInt(data->text, base_font, data->text_color,
- text_x, 0, text_width, sender->allocation.height);
+ text_x, 0, text_width, allocation.height);
return TRUE;
}
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_gtk.cc ('k') | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698