After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772775 - menu bindings needs attribute to force LTR for horizontal-buttons display-hint
menu bindings needs attribute to force LTR for horizontal-buttons display-hint
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 772731
 
 
Reported: 2016-10-11 20:58 UTC by Christian Hergert
Modified: 2016-10-14 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
allow horizontal-buttons-ltr and horizontal-buttons-rtl display-hint (1.58 KB, patch)
2016-10-11 21:42 UTC, Christian Hergert
none Details | Review
documentation update for horizonta-buttons-rtl,ltr (1.66 KB, patch)
2016-10-11 21:50 UTC, Christian Hergert
none Details | Review
add text-direction menu attribute (4.06 KB, patch)
2016-10-12 20:58 UTC, Christian Hergert
none Details | Review

Description Christian Hergert 2016-10-11 20:58:14 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.
Comment 1 Christian Hergert 2016-10-11 21:42:15 UTC
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.
Comment 2 Christian Hergert 2016-10-11 21:50:49 UTC
Created attachment 337474 [details] [review]
documentation update for horizonta-buttons-rtl,ltr

Add patch for documentation.
Comment 3 Matthias Clasen 2016-10-12 13:17:41 UTC
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.
Comment 4 Christian Hergert 2016-10-12 20:58:21 UTC
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.
Comment 5 Christian Hergert 2016-10-13 19:50:34 UTC
Can we merge this to gtk-3-22 branch too?
Comment 6 Matthias Clasen 2016-10-14 14:42:06 UTC
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.
Comment 7 Matthias Clasen 2016-10-14 14:47:54 UTC
and ... done