Bug 471067 - Checkboxes have weird blurry look on them
Summary: Checkboxes have weird blurry look on them
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.27.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-15 08:39 UTC by Akseli Lahtinen
Modified: 2023-06-23 14:44 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.6


Attachments
Some checkboxes look glitched or blurry (142.41 KB, image/png)
2023-06-15 08:39 UTC, Akseli Lahtinen
Details
Changed height in gammaray for comparison (8.14 KB, image/png)
2023-06-15 19:43 UTC, Akseli Lahtinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Akseli Lahtinen 2023-06-15 08:39:02 UTC
Created attachment 159676 [details]
Some checkboxes look glitched or blurry

SUMMARY

On openSUSE Tumbleweed, the checkbox icons have weird blurry look to them.
I used gammaray to check them and I couldn't find anything weird, but when i set the checkbox icon height to 21.5, it fixed itself. I think there's some misaligned pixel somewhere.

Screenshot of the issue as an attachment.

STEPS TO REPRODUCE
1. Open discover on opensuse tumbleweed
2. Open settings tab


OBSERVED RESULT

Some checkboxes look glitched.

EXPECTED RESULT

Everything should look normal.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230613
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.9
Kernel Version: 6.3.7-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

ADDITIONAL INFORMATION
I think this issue may pop up other places too, but I have gotten it repro'd most reliably in Discover.
Comment 1 Akseli Lahtinen 2023-06-15 08:40:44 UTC
To add, I have no fractional scaling on. I have two 1920x1080 monitors with 144hz.
Comment 2 Akseli Lahtinen 2023-06-15 19:43:21 UTC
Created attachment 159698 [details]
Changed height in gammaray for comparison

Added a new attachment, screenshot after using gammaray.

Both elements are on same page, so the image isnt copy pasted twice.

I modified the top element checkbox to have height 21.01, the error went away.

Bottom one is the default.

Seems there's some floating point erroring going on, I encounted something similar with outlines: Drawing a thin line with width of 1.0 would look wrong, but drawing it with width of 1.000001 would look right.

My problem is that I do not even know where to start fixing this, so any help is welcome.
Comment 3 Nate Graham 2023-06-15 21:52:29 UTC
Yeah, in the past we've seen that scrollable views can become pixel-misaligned; maybe that's what's happening here.

If you do a two-finger touchpad scroll *very slowly* do the checkboxes look better and then worse again as you scroll? If you aren't using a laptop, clicking and dragging on the scrollbar may also work.
Comment 4 Akseli Lahtinen 2023-06-16 06:29:11 UTC
Yep that's exactly what is going on! When I start scrolling the view, it fixes itself. If the view is in default position, the bug reappears.
Comment 5 Bug Janitor Service 2023-06-16 07:10:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/567
Comment 6 Akseli Lahtinen 2023-06-16 07:13:39 UTC
Git commit 33397c2c9aa54a2c7f6e873c5a9289aaabb34412 by Akseli Lahtinen.
Committed on 16/06/2023 at 07:09.
Pushed by akselmo into branch 'master'.

Fix broken checkbox pixel alignment

Without this, the pixel alignment looks wrong and checkboxes look glitchy

M  +2    -2    discover/qml/SourcesPage.qml

https://invent.kde.org/plasma/discover/-/commit/33397c2c9aa54a2c7f6e873c5a9289aaabb34412
Comment 7 Akseli Lahtinen 2023-06-16 07:38:47 UTC
Git commit 9bddbdd44a8c2fd5b0c2257737da216227d35eef by Akseli Lahtinen.
Committed on 16/06/2023 at 07:15.
Pushed by akselmo into branch 'Plasma/5.27'.

Fix broken checkbox pixel alignment

Without this, the pixel alignment looks wrong and checkboxes look glitchy


(cherry picked from commit 33397c2c9aa54a2c7f6e873c5a9289aaabb34412)

M  +2    -2    discover/qml/SourcesPage.qml

https://invent.kde.org/plasma/discover/-/commit/9bddbdd44a8c2fd5b0c2257737da216227d35eef
Comment 8 ratijas 2023-06-16 21:59:45 UTC
Looks like yes another case of KQuickStyleItem from qqc2-desktop-style rendering is misbehaving when a control is not perfectly pixel-aligned.

IIRC Arjen and Mart were looking into this some time ago.