summaryrefslogtreecommitdiffstats
path: root/chrome/common/gtk_util.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 20:12:20 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 20:12:20 +0000
commitf6582b315e31d5eb526ee97f9733130ae751dd20 (patch)
treeebec7de28867c4dc40ba8098860a7faf2d7f48a2 /chrome/common/gtk_util.cc
parentd9194223c0a66fbb6b673778ee576d3815306e1f (diff)
downloadchromium_src-f6582b315e31d5eb526ee97f9733130ae751dd20.zip
chromium_src-f6582b315e31d5eb526ee97f9733130ae751dd20.tar.gz
chromium_src-f6582b315e31d5eb526ee97f9733130ae751dd20.tar.bz2
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
Diffstat (limited to 'chrome/common/gtk_util.cc')
-rw-r--r--chrome/common/gtk_util.cc7
1 files changed, 7 insertions, 0 deletions
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;