Bug 439081

Summary: Regressed RTL support for the avatar changing menu
Product: [Applications] systemsettings Reporter: Omeritzics <omeritzicschwartz>
Component: kcm_usersAssignee: Janet Blackquill <uhhadd>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs-null, sitter
Priority: NOR Keywords: regression, rtl
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.27.5
Sentry Crash Report:
Attachments: Video of the bug

Description Omeritzics 2021-06-23 16:37:20 UTC
Created attachment 139620 [details]
Video of the bug

SUMMARY
The RTL support for the avatar changing menu is regressed. Cannot change the avatar to something other than name acronyms with different color backgrounds.

STEPS TO REPRODUCE
1. Use a RTL language (Hebrew, Arabic, Persian, etc.)
2. Go to kcm_users
3. Try to change the avatar to a Konqui avatar

OBSERVED RESULT
Cannot change the avatar to something other than name acronyms with different color backgrounds.

EXPECTED RESULT
Can change the avatar to something other than name acronyms with different color backgrounds.
Comment 1 Nate Graham 2021-07-28 23:09:05 UTC
Ouch, can confirm with systemsettings5 --reverse and an LTR language.
Comment 2 Nate Graham 2021-08-05 15:41:55 UTC
Can temporarily fix it by resizing the window.
Comment 3 Harald Sitter 2022-09-20 11:13:52 UTC
Is this still a problem? It seems to work for me on master.
Comment 4 Omeritzics 2022-09-20 17:17:54 UTC
(In reply to Harald Sitter from comment #3)
> Is this still a problem? It seems to work for me on master.

AFAIK this problem still exists on the Plasma 5.25. Did you use "--reverse" or a RTL language to reproduce?
Comment 5 Nate Graham 2022-09-20 18:05:46 UTC
I can reproduce it with `systemsettings --reverse kcm_users` on current git master.

When you click on the avatar to open the sheet with different picture options, it opens on the wrong page, and if you click on the back the sheet becomes blank.
Comment 6 Bug Janitor Service 2023-04-26 18:19:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2866
Comment 7 Harald Sitter 2023-05-07 10:53:32 UTC
Git commit 45bf882a51d1f985b1274c77dfda8d71f1583326 by Harald Sitter.
Committed on 07/05/2023 at 10:52.
Pushed by sitter into branch 'master'.

users kcm: hack around indexing confusion in swipeview

swipeview gets confused over which index it is on causing it to
automatically switch to an incorrect index. I know it has to do with
Container internals but haven't quite managed to track it down in
reasonable time. there are various Qt bug reports to do with
currentIndex handling being buggy though.

intermediate index resets seem to make the view behave accordingly so
let's apply one when setting the current index.

M  +14   -4    kcms/users/src/ui/PicturesSheet.qml

https://invent.kde.org/plasma/plasma-workspace/commit/45bf882a51d1f985b1274c77dfda8d71f1583326
Comment 8 Harald Sitter 2023-05-07 18:30:23 UTC
Git commit 0a913be612e3492576f502b4f1edc90a4858b95d by Harald Sitter.
Committed on 07/05/2023 at 16:13.
Pushed by sitter into branch 'Plasma/5.27'.

users kcm: hack around indexing confusion in swipeview

swipeview gets confused over which index it is on causing it to
automatically switch to an incorrect index. I know it has to do with
Container internals but haven't quite managed to track it down in
reasonable time. there are various Qt bug reports to do with
currentIndex handling being buggy though.

intermediate index resets seem to make the view behave accordingly so
let's apply one when setting the current index.
(cherry picked from commit 45bf882a51d1f985b1274c77dfda8d71f1583326)

M  +14   -4    kcms/users/package/contents/ui/PicturesSheet.qml

https://invent.kde.org/plasma/plasma-workspace/commit/0a913be612e3492576f502b4f1edc90a4858b95d