[gnome-shell] popupMenu: Fix popup menu layouts in RTL directions



commit 43661fff7639ae53cbbe20b8e02a9d6aae8ce3bf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jul 19 07:14:33 2013 -0400

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 8bd836c..57d9b49 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]