summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/nine_box.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 02:20:31 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 02:20:31 +0000
commit01c25692bcd51d81be1b5e8b215c25be5b3b1933 (patch)
tree0610f913264f716b8935dd7a01e424a83a51c039 /chrome/browser/gtk/nine_box.cc
parentbc840fa656285f46874e17adef64a140dbd056e9 (diff)
downloadchromium_src-01c25692bcd51d81be1b5e8b215c25be5b3b1933.zip
chromium_src-01c25692bcd51d81be1b5e8b215c25be5b3b1933.tar.gz
chromium_src-01c25692bcd51d81be1b5e8b215c25be5b3b1933.tar.bz2
More BIDI support:
- mirror nine boxes - mirror menu positioning - mirror download item show/hide logic http://crbug.com/15406 is relevant, although I'm not sure this 100% fixes it. TEST=use download shelf in Hebrew chrome. Things should be mirrored. Use it in English and nothing should be borked. Review URL: http://codereview.chromium.org/147176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/nine_box.cc')
-rw-r--r--chrome/browser/gtk/nine_box.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/gtk/nine_box.cc b/chrome/browser/gtk/nine_box.cc
index 888cedf..ba1b856 100644
--- a/chrome/browser/gtk/nine_box.cc
+++ b/chrome/browser/gtk/nine_box.cc
@@ -92,6 +92,11 @@ void NineBox::RenderToWidget(GtkWidget* dst) const {
cairo_translate(cr, dst->allocation.x, dst->allocation.y);
}
+ if (gtk_widget_get_direction(dst) == GTK_TEXT_DIR_RTL) {
+ cairo_translate(cr, dst_width, 0.0f);
+ cairo_scale(cr, -1.0f, 1.0f);
+ }
+
// Top row, center image is horizontally tiled.
if (images_[0])
DrawPixbuf(cr, images_[0], 0, 0);