diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-16 01:59:08 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-16 01:59:08 +0000 |
commit | 1888327270b1252ff9046bd08c9df9940e3a2f31 (patch) | |
tree | ac3dd6ea64570e7fbea0aca09993b79b000919a6 | |
parent | d0909d2a5dea9ec32c77b81aa5fa9c6e779c8eb0 (diff) | |
download | chromium_src-1888327270b1252ff9046bd08c9df9940e3a2f31.zip chromium_src-1888327270b1252ff9046bd08c9df9940e3a2f31.tar.gz chromium_src-1888327270b1252ff9046bd08c9df9940e3a2f31.tar.bz2 |
Gtk: fix find bar rendering following NineBox improvements.
Review URL: http://codereview.chromium.org/113496
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16221 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/nine_box.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/gtk/nine_box.cc b/chrome/browser/gtk/nine_box.cc index d86be56..325d4af 100644 --- a/chrome/browser/gtk/nine_box.cc +++ b/chrome/browser/gtk/nine_box.cc @@ -50,8 +50,13 @@ void NineBox::RenderToWidget(GtkWidget* dst) const { int dst_height = dst->allocation.height; cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(dst->window)); - // Transform our cairo from window to widget coordinates. - cairo_translate(cr, dst->allocation.x, dst->allocation.y); + // For widgets that have their own window, the allocation (x,y) coordinates + // are GdkWindow relative. For other widgets, the coordinates are relative + // 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); + } // The upper-left and lower-right corners of the center square in the // rendering of the ninebox. |