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
This commit is contained in:
Jasper St. Pierre 2013-07-19 07:14:33 -04:00
parent 509bdceac2
commit 43661fff76

View File

@ -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;