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

Unified Diff: chrome/browser/ui/gtk/nine_box.cc

Issue 8872004: GTK: More changes from raw widget->allocation to using the accessor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/find_bar_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/nine_box.cc
diff --git a/chrome/browser/ui/gtk/nine_box.cc b/chrome/browser/ui/gtk/nine_box.cc
index cb3f50ade5b709778e4024ca3687a030c7a39917..d43f308bbe7f2ea63474ddea9ed5e21a83083abd 100644
--- a/chrome/browser/ui/gtk/nine_box.cc
+++ b/chrome/browser/ui/gtk/nine_box.cc
@@ -121,8 +121,10 @@ void NineBox::RenderToWidget(GtkWidget* dst) const {
}
void NineBox::RenderToWidgetWithOpacity(GtkWidget* dst, double opacity) const {
- int dst_width = dst->allocation.width;
- int dst_height = dst->allocation.height;
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(dst, &allocation);
+ int dst_width = allocation.width;
+ int dst_height = allocation.height;
// The upper-left and lower-right corners of the center square in the
// rendering of the ninebox.
@@ -142,7 +144,7 @@ void NineBox::RenderToWidgetWithOpacity(GtkWidget* dst, double opacity) const {
// to their container.
if (GTK_WIDGET_NO_WINDOW(dst)) {
// Transform our cairo from window to widget coordinates.
- cairo_translate(cr, dst->allocation.x, dst->allocation.y);
+ cairo_translate(cr, allocation.x, allocation.y);
}
if (base::i18n::IsRTL()) {
« no previous file with comments | « chrome/browser/ui/gtk/find_bar_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698