Bug 423511

Summary: Change for commit 6b1cc98f causes desktop icon captions to appear fuzzy and dark
Product: [Plasma] plasmashell Reporter: ascaris
Component: Desktop ContainmentAssignee: Nate Graham <nate>
Status: CLOSED FIXED    
Severity: normal CC: nate, plasma-bugs, steviant
Priority: NOR Keywords: regression
Version: 5.21.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.19.5
Sentry Crash Report:
Attachments: Zoomed-in screenshot of how things looked prior to the change, as in 5.18.5 in the upper portion, and after the change, as in 5.19.x, in the lower portion.

Description ascaris 2020-06-25 16:22:19 UTC
Created attachment 129677 [details]
Zoomed-in screenshot of how things looked prior to the change, as in 5.18.5 in the upper portion, and after the change, as in 5.19.x, in the lower portion.

SUMMARY

Ever since 5.19.0 landed, I noticed the desktop icon captions looked fuzzy and dingy, for lack of a better term.  I'm using the default font of Noto Sans, 11 point, no forced DPI, antialiasing on, RGB, hinting medium. This happens on all of my Plasma PCs... one with Intel integrated graphics, one with nVidia discrete only (proprietary driver), and one with nVidia Optimus that uses both.

I used trial and error to find a cause, and it turned out to be the two small changes to FolderItemDelegate.qml in /usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/.  When I reverted to the previous version of that file, the one that was included with Plasma 5.18.5, the issue was resolved.

The issue happens with all the fonts that I tested.  It depends on the font size... it happens with 11 or 14pt text, but not 10, 12, or 13.  

The issue does not affect the captions of desktop widget/plasmoids like "Trash", which I have on my desktop.  If I create a new folder on the desktop and name it "Trash", you can see the difference between the way the text is rendered for the  widget and the desktop icon, as shown in the screenshots.


STEPS TO REPRODUCE
1. Ensure that 12 point Noto Sans is selected for the General font, with AA on, no forced DPI, hinting medium (though hinting doesn't seem to make any difference)
2. Start the system or restart the Plasma shell with the 5.19.x version of FolderItemDelegate.qml installed.


OBSERVED RESULT

Desktop icon captions appear "fuzzy" and darker than they should, but only for the icons representing files or folders in ~/Desktop (desktop is set to folder view).  Plasmoid/widgets, like "Trash", still have crisp, bright captions. 


EXPECTED RESULT

All of the captions should be crisp and clear, the same as the caption for "Trash".


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: KDE Neon User Edition, 5.19.2
(available in About System)
KDE Plasma Version: 5.19.2
KDE Frameworks Version: 5.71
Qt Version: 5.14.2
Comment 1 Nate Graham 2020-06-25 16:45:53 UTC
Apparently I introduced this with https://invent.kde.org/plasma/plasma-desktop/-/commit/6b1cc98f0959e6118259bf4f932e727aaf6df7a8 while fixing a binding loop. :(

With that Math.round() call, I guess the previous version had the side effect of always pixel-aligning the text, which is now non-deterministic, because I didn't see any visual regressions in my testing (and now with a 4k screen, I can't easily test anymore since pixel alignment errors are undetectable).
Comment 2 Nate Graham 2020-08-07 15:54:58 UTC
Git commit e7da61c1471d83ef28d6686542b40156cc9bd231 by Nate Graham.
Committed on 07/08/2020 at 15:54.
Pushed by ngraham into branch 'Plasma/5.19'.

Revert "[Folder view] Fix binding loop on width"

This reverts commit 6b1cc98f0959e6118259bf4f932e727aaf6df7a8.

The change may have resolved the binding loop, but it regressed text
display for people without high DPI screens. Apparently the old code was
having the effect of aligning the text to pixel boundaries, while the new
code does not. I will find another way to resolve the binding loop.
FIXED-IN: 5.19.5

M  +2    -4    containments/desktop/package/contents/ui/FolderItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/e7da61c1471d83ef28d6686542b40156cc9bd231
Comment 3 Nate Graham 2020-08-07 15:55:13 UTC
Git commit 519d076a350fc834090202836ce39cf32d9f873a by Nate Graham.
Committed on 07/08/2020 at 15:51.
Pushed by ngraham into branch 'master'.

Revert "[Folder view] Fix binding loop on width"

This reverts commit 6b1cc98f0959e6118259bf4f932e727aaf6df7a8.

The change may have resolved the binding loop, but it regressed text
display for people without high DPI screens. Apparently the old code was
having the effect of aligning the text to pixel boundaries, while the new
code does not. I will find another way to resolve the binding loop.
FIXED-IN: 5.19.5

M  +2    -4    containments/desktop/package/contents/ui/FolderItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/519d076a350fc834090202836ce39cf32d9f873a
Comment 4 steviant 2023-01-16 21:46:33 UTC
This bug affects more than just the desktop icons, for example the new label feature of the K menu (whatever that's called this week), also exhibits the same problem. This is a systemic bug with KDE developers not bothering to check whether their changes work on the normal DPI screens that most people use. 

Perhaps a solution is to ban all changes from being committed until they have been reviewed by some kind of chaperone to make sure that the developer is familiar with the concept of conventional DPI screens, the regressions with each new version are getting ridiculous because nobody is bothering to check whether their changes are compatible with the vast majority of systems.

KDE is becoming rapidly unusable because of this stupidity, and it's very frustrating, especially knowing that it basically comes down to a lack of concern for users who can't afford to replace all their gear with the latest, greatest hardware.
Comment 5 steviant 2023-01-16 21:48:43 UTC
I'm actually using KDE 5.26.5, and the problem is far worse than ever, but I wasn't able to select that version in the bug report.
Comment 6 Nate Graham 2023-01-17 16:48:13 UTC
This bug report is about a specific issue in Folder View caused by a specific code change. Kickoff doesn't share code with Folder View for its label rendering, so any issue you see there would be caused by something different. Can you please file a new bug report for that issue? Make sure to include a screenshot showing the issue so it's clear to people who aren't experiencing it themselves. Thanks!