Bug 465318

Summary: The "Orientation" label is sometimes inappropriately set to be the buddy for the orientation row even when automatic orientation is supported and its UI is visible
Product: [Applications] systemsettings Reporter: Ilya Bizyaev <bizyaev>
Component: kcm_kscreenAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: REPORTED ---    
Severity: minor CC: aleixpol, nate, nicolas.fella, notmart, plasma-bugs, wazhai
Priority: NOR    
Version: 5.26.90   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot

Description Ilya Bizyaev 2023-02-05 13:45:46 UTC
Created attachment 155959 [details]
Screenshot

SUMMARY

The "Orientation" label should be displayed next to the "Automatic" checkbox, otherwise it looks like the choice of automatic vs manual applies to the scaling instead.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 5.14.21-150400.24.41-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-02-07 17:51:38 UTC
That's weird, it's in the right place for me with git master on Wayland, which isn't too far off from what you've got. Let me inspect the code to see what might be going on.
Comment 2 Nate Graham 2023-02-07 17:56:47 UTC
The code has this:

Kirigami.FormData.label: i18n("Orientation:")
Kirigami.FormData.buddyFor: autoRotateColumn.visible ? autoRotateRadio : orientation

So what appears to be going on is that it's being set as the buddy for the "orientation" row, rather than "autoRotateRadio". But that doesn't make any sense since this should only happen when "autoRotateColumn" isn't visible, but your screenshot clearly shows that it is visible.

Maybe it gets set to visible too late and the binding on Kirigami.FormData.buddyFor doesn't re-evaluate in Kirigami.FormLayout?
Comment 3 Ilya Bizyaev 2024-03-16 17:01:52 UTC
I tried to test this with Plasma 6.0 (Wayland), but the automatic rotation setting seems to have vanished. Has it been moved?
`iio-sensor-proxy` is installed.
Comment 4 Nate Graham 2024-03-18 18:30:22 UTC
It's there for me, and it's also in the right place. I suspect that the issue you're seeing now is connected to the earlier one with the label appearing in the wrong place.