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

Unified Diff: chrome/browser/ui/gtk/infobars/infobar_gtk.cc

Issue 8885016: GTK: Even more changes from raw allocation access to gtk_widget_get_allocation(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove temporary Created 9 years 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
Index: chrome/browser/ui/gtk/infobars/infobar_gtk.cc
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index eb22a332080853e6a988215bd8ad7a2c5a8130f2..2c0b31afe07e8348f7cd86c079f14a59e441e3c9 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -212,7 +212,9 @@ void InfoBarGtk::OnCloseButton(GtkWidget* button) {
gboolean InfoBarGtk::OnBackgroundExpose(GtkWidget* sender,
GdkEventExpose* event) {
- const int height = sender->allocation.height;
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(sender, &allocation);
+ const int height = allocation.height;
cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(sender->window));
gdk_cairo_rectangle(cr, &event->area);
@@ -238,9 +240,8 @@ gboolean InfoBarGtk::OnBackgroundExpose(GtkWidget* sender,
border_color.green / 65535.0,
border_color.blue / 65535.0);
cairo_set_line_width(cr, 1.0);
- int y = sender->allocation.height;
- cairo_move_to(cr, 0, y - 0.5);
- cairo_rel_line_to(cr, sender->allocation.width, 0);
+ cairo_move_to(cr, 0, allocation.height - 0.5);
+ cairo_rel_line_to(cr, allocation.width, 0);
cairo_stroke(cr);
cairo_destroy(cr);
« no previous file with comments | « chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698