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

Unified Diff: chrome/browser/ui/gtk/infobars/infobar_container_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
« no previous file with comments | « chrome/browser/ui/gtk/download/download_shelf_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/infobar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
diff --git a/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
index 422db167f08295f401090b6c0e72c2a0b18732df..4f24b97ab43a8f4ca88b836fdbecd05e2366bef5 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
+#include "ui/base/gtk/gtk_compat.h"
#include "ui/gfx/canvas_skia_paint.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/rect.h"
@@ -133,8 +134,11 @@ void InfoBarContainerGtk::PaintInfobarBitsOn(GtkWidget* sender,
gtk_widget_translate_coordinates((*it)->widget(), sender,
0, 0,
NULL, &y);
- if (GTK_WIDGET_NO_WINDOW(sender))
- y += sender->allocation.y;
+ if (!gtk_widget_get_has_window(sender)) {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(sender, &allocation);
+ y += allocation.y;
+ }
// We rely on the +1 in the y calculation so we hide the bottom of the drawn
// triangle just right outside the view bounds.
« no previous file with comments | « chrome/browser/ui/gtk/download/download_shelf_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698