From 5f6dce2b5ca7ef07c6c6b43020390f2a6143c53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 22 Sep 2011 15:33:43 +0200 Subject: [PATCH] popup-menu: Fix allocation in RTL locales Commit ed7d4928e5 fixed some width-for-height cases in popup menu items, but did not consider RTL locales. Fix this. https://bugzilla.gnome.org/show_bug.cgi?id=659827 --- js/ui/popupMenu.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 53ddc9712..3ee3c1770 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -320,10 +320,14 @@ PopupBaseMenuItem.prototype = { } extraWidth = availWidth - naturalWidth; } else { - if (child.span == -1) - availWidth = box.x2 - x; - else + if (child.span == -1) { + if (direction == St.TextDirection.LTR) + availWidth = box.x2 - x; + else + availWidth = x - box.x1; + } else { availWidth = naturalWidth; + } extraWidth = 0; }