GNOME Bugzilla – Bug 772775
menu bindings needs attribute to force LTR for horizontal-buttons display-hint
Last modified: 2016-10-14 14:47:54 UTC
When binding gtk/menus.ui to popovers, such as in the hamburger menus, we might need to maintain the LTR positioning of buttons. However, they can end up in a RTL mode since they are displayed in a box. We should add something like "display-hint" that allows us to enforce LTR or RTL in the layout. I suggest we just append -ltr to horizontal-buttons (so horizontal-buttons-ltr) to enforce the layout ordering.
Created attachment 337473 [details] [review] allow horizontal-buttons-ltr and horizontal-buttons-rtl display-hint This allows a display-hint of horizontal-buttons-ltr or horizontal-buttons-rtl to be specified. Documentation patch to be followed up.
Created attachment 337474 [details] [review] documentation update for horizonta-buttons-rtl,ltr Add patch for documentation.
Hmm. I think it would look cleaner to me if it was a separate attribute, say "text-direction". That is more plumbing, but only a little.
Created attachment 337538 [details] [review] add text-direction menu attribute That seems reasonable. The updated patch adds a "text-direction" attribute that can affect the layout of the GtkBox used for a "horizontal-buttons" display-hint.
Can we merge this to gtk-3-22 branch too?
I think thats ok. A little fuzzy on api-ness, but the error condition here is pretty harmless: we will just ignore the text-direction attribute.
and ... done