Bug 449884 - Text looks cut off and buggy when scrolling using trackpad or mouse
Summary: Text looks cut off and buggy when scrolling using trackpad or mouse
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.90.0
Platform: Neon Linux
: HI normal with 1 vote (vote)
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords: regression
: 446048 449970 449979 450011 450055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-09 20:16 UTC by Logan Turner
Modified: 2022-02-15 19:39 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.92


Attachments
Bad text rendering in discover when scrolling with touchpad (350.16 KB, video/x-matroska)
2022-02-10 00:46 UTC, Jack Hill
Details
Gammaray screenshot (320.70 KB, image/png)
2022-02-10 20:57 UTC, Nicolas Fella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Logan Turner 2022-02-09 20:16:27 UTC
SUMMARY
When scrolling menus in Kirigami apps (System Settings, System Monitor, etc) the text looks buggy and cut off whilst scrolling. 

Changing the compositor rendering settings does not affect this bug, and it persists in both Xorg and Wayland sessions. Using different themes also does not affect this issue, as it persists regardless of QT theme.

Changing trackpad/mouse settings also does not affect this behavior.

STEPS TO REPRODUCE
1. Open a Kirigami app (System Settings for this example).
2. Ensure that the sidebar view is enabled.
3. Scroll up or down slowly in the sidebar or submenus using your trackpad or mouse.

OBSERVED RESULT
The text will look distorted and choppy whilst scrolling. I have a screen recording of the issue as well, which is attached.

EXPECTED RESULT
Text looks smooth and does not become choppy or pixelated when scrolling

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.24
KDE Plasma Version: 5.24
KDE Frameworks Version: 5.90
Qt Version: 5.15.3
Kernel: 5.13.0-28-Generic (X64)

ADDITIONAL INFORMATION
CPU: AMD Athlon 3020e
GPU: AMD Radeon Vega 3 (integrated GPU)
Memory: 4GB
Disk: 128GB SSD
Comment 1 Jack Hill 2022-02-10 00:46:40 UTC
Created attachment 146512 [details]
Bad text rendering in discover when scrolling with touchpad
Comment 2 Patrick Silva 2022-02-10 18:54:53 UTC
Can reproduce on Wayland session of neon unstable while scrolling the effects list in Desktop Effects KCM with touchpad.
Comment 3 Nicolas Fella 2022-02-10 20:20:07 UTC
This kind of issue usually happens when a QML item has a non-integer position. In this case it seems like the scrollview's flickable's child item has a that
Comment 4 Nicolas Fella 2022-02-10 20:55:01 UTC
*** Bug 449970 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2022-02-10 20:56:30 UTC
Same thing in systemsettings (https://bugs.kde.org/show_bug.cgi?id=449970)
Comment 6 Nicolas Fella 2022-02-10 20:57:01 UTC
Created attachment 146555 [details]
Gammaray screenshot
Comment 7 Nicolas Fella 2022-02-10 20:58:04 UTC
In all cases there's a RefreshableScrollView involved
Comment 8 Nicolas Fella 2022-02-10 21:57:08 UTC
This seems to be caused by https://invent.kde.org/frameworks/kirigami/-/commit/f6ca218607ff7e5d5066eb3224154c3256cb9516
Comment 9 Noah Davis 2022-02-11 01:51:18 UTC
We should probably round the contentX and contentY position changes in Kirigami WheelHandler.
Comment 10 Noah Davis 2022-02-11 02:16:18 UTC
Actually, isn't there already a solution built into Flickable? Set `pixelAligned: true`. That's technically the correct thing to do. It's not going to work that well with fractional scale factors though. Even if we made a built-in workaround in Kirigami WheelHandler, I'm not sure we'd be able to do much about fractional scale factors.
Comment 11 Noah Davis 2022-02-11 02:19:18 UTC
The ideal fix would be to fix the text elements in Qt so that they don't glitch out when given fractional positions.
Comment 12 Behzad A 2022-02-11 10:06:48 UTC
*** Bug 449979 has been marked as a duplicate of this bug. ***
Comment 13 Nicolas Fella 2022-02-11 13:50:19 UTC
*** Bug 450011 has been marked as a duplicate of this bug. ***
Comment 14 Bug Janitor Service 2022-02-11 14:26:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/494
Comment 15 Noah Davis 2022-02-11 14:44:42 UTC
Git commit de215e196ed8b40a4abf5fa0da6c59adeba30187 by Noah Davis.
Committed on 11/02/2022 at 14:26.
Pushed by ndavis into branch 'master'.

WheelHandler: Round contentX/contentY positions

I'm basically forcing pixel alignment because I don't see a reason not
to when scrolling with a touchpad or mouse wheel. We should ideally also
fix this in Qt so that workarounds like these aren't necessary.

https://bugs.kde.org/show_bug.cgi?id=449884

M  +15   -0    src/wheelhandler.cpp

https://invent.kde.org/frameworks/kirigami/commit/de215e196ed8b40a4abf5fa0da6c59adeba30187
Comment 16 Nicolas Fella 2022-02-11 23:58:30 UTC
*** Bug 450055 has been marked as a duplicate of this bug. ***
Comment 17 bomiyr 2022-02-15 19:39:06 UTC
*** Bug 446048 has been marked as a duplicate of this bug. ***