GNOME Bugzilla – Bug 645524
Shell menus (user menu for example) has wrong alignment in RTL locales.
Last modified: 2011-03-22 17:27:26 UTC
Created attachment 184061 [details] Screenshot of the wrong alignment Shell menus, including User Menu, Bluetooth, accessibility, volume control, etc. are aligned to the left, although in RTL locales, the text should be aligned to the right. Screenshot attached. Should be easy to fix, text-align: right; in the right place on the CSS file will fix this.
actually, presumably the whole layout should be flipped
Created attachment 184099 [details] [review] PopupMenu: invert the menu when in RTL locales Change the way menu items allocate their contents to take text direction into account, so they're fully reversed in RTL locales, and St.Align.START / END are respected.
Comment on attachment 184099 [details] [review] PopupMenu: invert the menu when in RTL locales >+ /* This returns column widths in logical order (i.e. from the dot >+ to the image), not in visual order (left to right) */ //-style comments >+ } else if (child.align === St.Align.CENTER) { >+ childBox.x1 = x - Math.round(extraWidth / 2); >+ childBox.x2 = childBox.x1 - naturalWidth; x1 and x2 are reversed here (the RTL case) >diff --git a/src/shell-global.c b/src/shell-global.c That shouldn't have ended up in this patch... It seems pretty clear that this doesn't change the LTR behavior at all, and (with the above fix), all the RTL stuff looks right too. And even if it's wrong, it's probably still better than how it is now... so I think we should commit this. (Not sure how frozen we are. Talk to Owen on IRC.)
Created attachment 184101 [details] [review] PopupMenu: invert the menu when in RTL locales Change the way menu items allocate their contents to take text direction into account, so they're fully reversed in RTL locales, and St.Align.START / END are respected.
Attachment 184101 [details] pushed as cbd1873 - PopupMenu: invert the menu when in RTL locales