From 43661fff7639ae53cbbe20b8e02a9d6aae8ce3bf Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 19 Jul 2013 07:14:33 -0400 Subject: [PATCH] popupMenu: Fix popup menu layouts in RTL directions The math for inverting RTL layouts (which was copy/pasted from ClutterBoxLayout) was incorrect for non-zero child offsets. https://bugzilla.gnome.org/show_bug.cgi?id=704542 --- js/ui/popupMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 8bd836c91..57d9b49e2 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -317,7 +317,7 @@ const PopupBaseMenuItem = new Lang.Class({ } if (direction == Clutter.TextDirection.RTL) - childBox.x1 = width - x - availWidth; + childBox.x1 = box.x1 + (box.x2 - x - availWidth); else childBox.x1 = x; childBox.x2 = childBox.x1 + availWidth;