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

Unified Diff: chrome/browser/ui/gtk/notifications/balloon_view_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/ui/gtk/nine_box.cc ('k') | chrome/browser/ui/gtk/status_bubble_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 22734f8f4591c00ca696ad4c028cc9311e5c0752..9874dfd32dfe815182ca380ad654d80b3d4d06c2 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -417,15 +417,17 @@ gboolean BalloonViewImpl::OnContentsExpose(GtkWidget* sender,
gdk_cairo_rectangle(cr, &event->area);
cairo_clip(cr);
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(sender, &allocation);
+
// According to a discussion on a mailing list I found, these degenerate
// paths are the officially supported way to draw points in Cairo.
cairo_set_source_rgb(cr, 0, 0, 0);
cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
cairo_set_line_width(cr, 1.0);
- cairo_move_to(cr, 0.5, sender->allocation.height - 0.5);
+ cairo_move_to(cr, 0.5, allocation.height - 0.5);
cairo_close_path(cr);
- cairo_move_to(cr, sender->allocation.width - 0.5,
- sender->allocation.height - 0.5);
+ cairo_move_to(cr, allocation.width - 0.5, allocation.height - 0.5);
cairo_close_path(cr);
cairo_stroke(cr);
cairo_destroy(cr);
« no previous file with comments | « chrome/browser/ui/gtk/nine_box.cc ('k') | chrome/browser/ui/gtk/status_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698