fix menu position for RTL locales

https://bugzilla.gnome.org/show_bug.cgi?id=584662
This commit is contained in:
Abderrahim Kitouni 2009-12-25 09:58:32 +01:00 committed by Dan Winship
parent a4feb91644
commit 216dafd5b1

View File

@ -233,7 +233,12 @@ StatusMenu.prototype = {
let [panelX, panelY] = panel.get_transformed_position();
let [panelWidth, panelHeight] = panel.get_transformed_size();
let menuX = Math.round(panelX + panelWidth - menuWidth);
let menuX;
if (St.Widget.get_default_direction() == St.TextDirection.RTL) {
menuX = panelX;
} else {
menuX = Math.round(panelX + panelWidth - menuWidth);
}
let menuY = Math.round(panelY + panelHeight);
Shell.popup_menu(this._menu, event.get_button(), event.get_time(),