Bug 471812

Summary: Orientation label moves after selecting a different monitor
Product: [Applications] systemsettings Reporter: Justin Zobel <justin.zobel>
Component: kcm_kscreenAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: nate, plasma-bugs
Priority: NOR Keywords: qt6
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: Screenshot 1
Screenshot 2

Description Justin Zobel 2023-07-01 03:33:03 UTC
Wasn't sure where to submit this so threw it under KDE.

Need multiple monitors to test as it only appears to happen when you select a different monitor than the default one.

STEPS TO REPRODUCE
1. Right-click on the desktop and select Configure Display Settings
2. Note the Orientation label's position
3. Select another display in the top section

OBSERVED RESULT
Orientation label moves

EXPECTED RESULT
The orientation label does not move

Qt6 git master
Comment 1 Nate Graham 2023-07-16 13:30:56 UTC
How strange, can you attach screenshots for those of us without multiple screens handy?
Comment 2 Justin Zobel 2023-07-18 06:46:21 UTC
Created attachment 160349 [details]
Screenshot 1
Comment 3 Justin Zobel 2023-07-18 06:47:25 UTC
Created attachment 160350 [details]
Screenshot 2

Screenshot 1 is when I initially open Display Configuration

Screenshot 2 is when I have selected a different monitor

Photos used instead of screenshots as my spectacle is fubar due to another bug (NVIDIA I think)
Comment 4 Nate Graham 2023-07-18 06:56:20 UTC
Heh it's wrong in both cases :p
Comment 5 Nate Graham 2023-07-25 18:35:55 UTC
Can reproduce.
Comment 6 Nate Graham 2023-07-25 18:38:17 UTC
Code says this:

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

The buddy assignment seems to be buggy. It's being a buddy for orientation even when autoRotateColumn is visible.
Comment 7 Nate Graham 2023-09-01 17:57:10 UTC
Git commit c2941121573d6533c159451890710fe522c92055 by Nate Graham.
Committed on 01/09/2023 at 19:55.
Pushed by ngraham into branch 'master'.

kcm: fix "Orientation:" label positioning

The FormData.buddyFor: property requires that the target be a direct
child, so make it that. After that, we can use the
FormData.labelAlignment: property to make it appear in the right place.
FIXED-IN: 6.0

M  +2    -1    kcm/ui/Orientation.qml

https://invent.kde.org/plasma/kscreen/-/commit/c2941121573d6533c159451890710fe522c92055