Add Right To Left support.
ClosedPublic

Authored by safaalfulaij on Sep 4 2017, 9:18 AM.

Details

Summary

Support Right To Left interface in the UI and the configuration.

Test Plan

Everything works as expected.

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
safaalfulaij created this revision.Sep 4 2017, 9:18 AM
  • Fix icons.

Thanks for this work. Very much appreciated.

The result is very good. Thanks a lot for that because the application will be much more accessible to a lot of people.

I did test and noticed some margins are still wrong (right side instead of left side). Could you fix them before landing your patch ?

Great! Thanks a lot!
Well, I've noticed that required Qt version has changed to 5.8, which is good for moving some lines.
But for the margins, I think there is an upstream bug. Here I just added the opposite margin property, but for all of the Layout-based items, this will need several lines added, which is a mess. I saw some margin properties already contains an if statement.
Plus for whatever new Layout-based item, this has to be considered.
I'll wait and see if it's really a bug in Qt. If not, then maybe an easier and cleaner way is possible.

That's one. Two is the sliders. They act very strangely in RTL layouts (even in Plasma).
For now they are almost useless: wrong place, dragging takes them the other side, wrong filling area (the opposite)..
If the app will use QQC2 in the near future, then it's alright. (QQC2 slider is better in terms of RTL layout.)
If not, better not to merge this till that happens.

Great! Thanks a lot!
Well, I've noticed that required Qt version has changed to 5.8, which is good for moving some lines.
But for the margins, I think there is an upstream bug. Here I just added the opposite margin property, but for all of the Layout-based items, this will need several lines added, which is a mess. I saw some margin properties already contains an if statement.
Plus for whatever new Layout-based item, this has to be considered.
I'll wait and see if it's really a bug in Qt. If not, then maybe an easier and cleaner way is possible.

I will let you check that.
In any case, I would like to have proper support for RTL even if it increases maintenance cost.

That's one. Two is the sliders. They act very strangely in RTL layouts (even in Plasma).
For now they are almost useless: wrong place, dragging takes them the other side, wrong filling area (the opposite)..
If the app will use QQC2 in the near future, then it's alright. (QQC2 slider is better in terms of RTL layout.)
If not, better not to merge this till that happens.

I was more or less waiting for a proper desktop style for QQC2. I am currently only using them for the tooltip of truncated labels.
I tested the sliders and this is really broken. Do you know if there is a bug report for that ?

I will try to use sliders from QQC2.

Thanks again for your work.

I will let you check that.
In any case, I would like to have proper support for RTL even if it increases maintenance cost.

I'll see how the margin thing goes, if it's a bug, then we must increase, unfortunately, the maintenance cost, as Qt takes ages for fixing :-)

I was more or less waiting for a proper desktop style for QQC2. I am currently only using them for the tooltip of truncated labels.
I tested the sliders and this is really broken. Do you know if there is a bug report for that ?

I will try to use sliders from QQC2.

Thanks again for your work.

Yes I opened one today, actually two, but the second is one small problem with QQC2's slider (which you won't face ;).

Thank you!

I have pushed a patch to use QQCv2 for the sliders. Hopefully, I am able to remove the custom style code when Plasma v5.11 is released on distributions.

I have forgotten one point. There is a configuration dialog. I have just tested it and saw that it is not supporting reversed layouts. Could you add this to your patch ?

Best regards

Move LayoutMirroring attached property and fix Layout.rightMargin/leftMargin in
RTL interfaces.

Fix Action item's icon.

I have forgotten one point. There is a configuration dialog. I have just tested it and saw that it is not supporting reversed layouts. Could you add this to your patch ?

Best regards

I applied the mirroring on it! Isn't it “localFileConfiguration/package/contents/ui/main.qml”?

And is this a leftover?

Now I'm thinking of one last mirror, the playback icon. Currently KDE apps/widgets doesn't flip/mirror it, but I found that GNOME does, and RTL support in GNOME is really good that I don't imagine they've could miss that.

And thanks for QQC2's Slider and the RTL fix :-)

mgallien accepted this revision.Sep 5 2017, 7:09 PM

Thanks a lot for your work. This is very valuable and very much appreciated.
Can I blog about your work ?

This revision is now accepted and ready to land.Sep 5 2017, 7:09 PM
safaalfulaij retitled this revision from Add RightToLeft support. to Add Right To Left support..Sep 5 2017, 7:32 PM
safaalfulaij edited the summary of this revision. (Show Details)
safaalfulaij edited the test plan for this revision. (Show Details)

Thanks a lot for your work. This is very valuable and very much appreciated.
Can I blog about your work ?

Well, I didn't do much, but sure why not?
I don't know if I can push or not, but my working copy is messed up as usual. Can you please push the changes? :)

Thanks a lot. I've pushed the Arabic translation as well.

This revision was automatically updated to reflect the committed changes.