Bug 457223

Summary: Scrollable lists in OverlaySheet have unnecessary horizontal scrollbar which blocks the last item
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Jin Liu <ad.liu.jin>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, notmart
Priority: NOR    
Version First Reported In: 5.96.0   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.97
Sentry Crash Report:
Attachments: Screenshot of the bug

Description Jin Liu 2022-07-28 06:08:52 UTC
SUMMARY
Digital Clock's "Add More Timezones" dialog has a horizontal scrollbar that can't scroll. And it blocks the item underneath, makes selecting the last item very difficult.

I think there're two problems here:
1. Either this dialog shouldn't have a horizontal scrollbar, or it shouldn't elide long items so the scrollbar actually works.
2. The horizontal scrollbar shouldn't block when there's only one item in the list.

Actually this dialog is quite buggy when there're only a few items. Using mouse wheel to scroll up and down causes various weird problems.

STEPS TO REPRODUCE
1. Open Digital Clock's settings
2. Select "Time Zones"
3. Click "Add Time Zones"
4. Input "Paris"

OBSERVED RESULT
"Paris" is blocked by the horizontal scrollbar

EXPECTED RESULT
"Paris" is not blocked.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Comment 1 Jin Liu 2022-07-28 06:10:11 UTC
Created attachment 150958 [details]
Screenshot of the bug
Comment 2 Nate Graham 2022-07-29 18:13:32 UTC
Caused by https://bugreports.qt.io/browse/QTBUG-83890, which is frustratingly still open after all these years. I'll add the traditional workaround for it.
Comment 3 Nate Graham 2022-07-29 18:16:56 UTC
Git commit 5728e56dc37a8a05d6bc91227cea3cb375fe8445 by Nate Graham.
Committed on 29/07/2022 at 18:13.
Pushed by ngraham into branch 'master'.

OverlaySheet: add workaround for Qt horizontal scrollview bug

https://bugreports.qt.io/browse/QTBUG-83890 doesn't seem like it's
going to be fixed anytime soon, so let's add the traditional workaround
for it. Until it's fixed, all instances of QQC2.ScrollView that aren't
intended to be horizontally scrollable need this workaround.
FIXED-IN: 5.97

M  +3    -0    src/controls/templates/OverlaySheet.qml

https://invent.kde.org/frameworks/kirigami/commit/5728e56dc37a8a05d6bc91227cea3cb375fe8445