[Development] right-to-left mode on Mac

René J.V. Bertin rjvbertin at gmail.com
Mon Jun 26 23:10:56 CEST 2017


On Monday June 26 2017 20:35:54 Gabriel de Dietrich wrote:

> Are you referring to context menus or menubar menus? We fully layout the former, but the latter are entirely delegated to macOS.

Both, to some extent. I know Qt has very little control over how menus of the native menubar are rendered so R2L behaviour in those will have to be the result of an API call, or simply of selecting a language requiring it. But menubars can of course also be non-native and in that case they're drawn fully by Qt.

> In any case, yes, we should expect something similar from Qt applications, at least if the appropriate translation file is provided.

Oh joy :)
I presume you mean that the translation file will take care of the item text - it cannot really do anything else, right? In any case I never saw text rendering being reversed when activating R2L mode.

> Also, notice the shortcuts in the menubar menu.

Yes, I noticed those. Does that actually make things easier?

BTW, here's a curiosity I've been seeing for a while now in the KF5 oxygen demo application:

```
action = menu->addAction( i18n( "<- Check here" ) );
```

After activating R2L mode, "Check here" still reads the same way, but something flipped and moved the ascii arrow. That still happens with the Macintosh style, but the menu tick remains on the left in that case, evidently.

> 
> Best regards,
> 
> Dr. Gabriel de Dietrich
> Senior Software Developer
> The Qt Company — www.qt.io<http://www.qt.io>
> 
> On Jun 25, 2017, at 3:35 AM, René J.V. Bertin <rjvbertin at gmail.com<mailto:rjvbertin at gmail.com>> wrote:
> 
> Hello,
> 
> 
> I notice that most styles invert the menu design when you activate right-to-left layout mode, putting the shortcut hint to the left of the (right-aligned) menu item text (and right-aligning texted separators if those are supported and asymmetric).
> 
> The Mac theme doesn't. Shortcut hints are displayed as "C" instead of "C" but they continue to be shown to the right of the (left-aligned) menu text.
> 
> Is that what Apple's HIG dictate?
> 
> Regards,
> R.
> _______________________________________________
> Development mailing list
> Development at qt-project.org<mailto:Development at qt-project.org>
> http://lists.qt-project.org/mailman/listinfo/development
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: l2r-menu-fusion.png
Type: image/png
Size: 11824 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170626/4e052b0d/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r2l-menu-fusion.png
Type: image/png
Size: 10383 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170626/4e052b0d/attachment-0001.png>


More information about the Development mailing list