From f6582b315e31d5eb526ee97f9733130ae751dd20 Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Wed, 15 Jul 2009 20:12:20 +0000 Subject: gtk: Handle RTL layout when positioning the tab strip drop arrow. BUG=none TEST=none Review URL: http://codereview.chromium.org/149695 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20778 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/gtk_util.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/common/gtk_util.cc') diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc index 1706a12..a442918 100644 --- a/chrome/common/gtk_util.cc +++ b/chrome/common/gtk_util.cc @@ -370,6 +370,13 @@ int MirroredLeftPointForRect(GtkWidget* widget, const gfx::Rect& bounds) { return widget->allocation.width - bounds.x() - bounds.width(); } +int MirroredXCoordinate(GtkWidget* widget, int x) { + if (l10n_util::GetTextDirection() != l10n_util::RIGHT_TO_LEFT) { + return widget->allocation.width - x; + } + return x; +} + bool WidgetContainsCursor(GtkWidget* widget) { gint x = 0; gint y = 0; -- cgit v1.1