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
This commit is contained in:
Florian Müllner 2011-09-22 15:33:43 +02:00
parent a7405e8b39
commit 5f6dce2b5c

View File

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