Bug 490402 - Desktop file/folder names overflow selection highlight with elevated font size
Summary: Desktop file/folder names overflow selection highlight with elevated font size
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 6.1.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 492447 496857 504050 505082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-07-17 12:21 UTC by Rodeffs
Modified: 2025-06-16 12:11 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.6
Sentry Crash Report:


Attachments
A video depicting the issues (3.43 MB, video/x-matroska)
2024-07-17 12:21 UTC, Rodeffs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rodeffs 2024-07-17 12:21:33 UTC
Created attachment 171737 [details]
A video depicting the issues

SUMMARY

After updating KDE frameworks to the version 6.4.0 I've encountered several issues with desktop icons

STEPS TO REPRODUCE
1. Create a shotcut on the desktop with a name that doesn't fit in one line
2. Try to open it after hovering cursor over it and then moving the cursor away
3. Try to drag the icon across the screen

OBSERVED RESULT
1. The name doesn't fit in the highlighted frame
2. The shortcut doesn't open with repeated clicks
3. Sometimes the icon lags and snaps back to its previous place
4. Sometimes letters collide with each other and are a wrong size

EXPECTED RESULT
1. The name should fit in the highlighted frame
2. If the cursor is over the shortcut, it must open after a double click regardless  
3. The icon should remain in place
4. Letters should adhere to the specified font

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Resolution: 2560x1600 (16:10)
Scale: 120%
Refresh rate: 120 Hz
Font: Noto Sans 13pt
Comment 1 Rodeffs 2024-07-17 12:23:35 UTC
Forgot to mention, my graphics platform is wayland
Comment 2 David Edmundson 2024-07-18 13:30:31 UTC
Can you share your folderview settings: 

Right click -> Desktop and wallpaper -> Icons
Comment 3 Rodeffs 2024-07-18 15:34:06 UTC
(In reply to David Edmundson from comment #2)
> Can you share your folderview settings: 
> 
> Right click -> Desktop and wallpaper -> Icons

Arrangement: Top to Bottom, Align left
Lock in place: No
Sorting: Manual
Icon size: 4
Label width: Medium
Text lines: 2
When hovering over icons: Show folder preview popups
Rename: yes
Previews: yes
Configure Preview Plugins: all apart from text files
Comment 4 Nate Graham 2024-10-31 21:20:19 UTC
Can confirm, it's this bit:

> Font: Noto Sans 13pt

The height is gridUnit-based, not based on the actual height of the font. And we made gridUnit no longer auto-adjust with the font height.
Comment 5 Nate Graham 2024-11-14 15:33:53 UTC
So, fundamentally we have two options:
1. Stop basing the height on GridUnit here in this code, and explicitly use the metrics of the actual text.
2. Revert the change to make GridUnit static (see Bug 493687)

See also Bug 493687 comment 1
Comment 6 Nate Graham 2024-12-11 22:29:51 UTC
*** Bug 496857 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2025-06-04 15:52:53 UTC
*** Bug 505082 has been marked as a duplicate of this bug. ***
Comment 8 Bug Janitor Service 2025-06-06 21:54:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3048
Comment 9 Nate Graham 2025-06-09 15:10:59 UTC
Git commit c35298ff6067f859153959cddfcf2c16943110bf by Nate Graham.
Committed on 09/06/2025 at 15:10.
Pushed by ngraham into branch 'master'.

FolderItemDelegate: use label implicitHeight in frame size calculation

Assuming that a GridUnit was roughly the height of a line of text was
safe before d8510e54f0a79334a11b7215cc3b28fdbe15149b in Kirigami, but
afterwards it no longer is. Now the frame height is wrong when the font
has a substantially different size from that of 10pt Noto Sans.

Fortunately we don't need to do anything super complicated to fix this;
just use the implicitHeight of the label, which ensures that the height
is correct for everything.
FIXED-IN: 6.3.6

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/c35298ff6067f859153959cddfcf2c16943110bf
Comment 10 Nate Graham 2025-06-09 15:11:33 UTC
Git commit b4ea71a8921b8303944f070fdddc003e6af32494 by Nate Graham.
Committed on 09/06/2025 at 15:11.
Pushed by ngraham into branch 'Plasma/6.4'.

FolderItemDelegate: use label implicitHeight in frame size calculation

Assuming that a GridUnit was roughly the height of a line of text was
safe before d8510e54f0a79334a11b7215cc3b28fdbe15149b in Kirigami, but
afterwards it no longer is. Now the frame height is wrong when the font
has a substantially different size from that of 10pt Noto Sans.

Fortunately we don't need to do anything super complicated to fix this;
just use the implicitHeight of the label, which ensures that the height
is correct for everything.
FIXED-IN: 6.3.6


(cherry picked from commit c35298ff6067f859153959cddfcf2c16943110bf)

8988e894 FolderItemDelegate: use label implichtHeight in frame size calculation

Co-authored-by: Nate Graham <nate@kde.org>

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/b4ea71a8921b8303944f070fdddc003e6af32494
Comment 11 Nate Graham 2025-06-09 15:11:57 UTC
Git commit 7f6c1372a86b70a6181df2dfc134a80e37f08e22 by Nate Graham.
Committed on 09/06/2025 at 15:11.
Pushed by ngraham into branch 'Plasma/6.3'.

FolderItemDelegate: use label implicitHeight in frame size calculation

Assuming that a GridUnit was roughly the height of a line of text was
safe before d8510e54f0a79334a11b7215cc3b28fdbe15149b in Kirigami, but
afterwards it no longer is. Now the frame height is wrong when the font
has a substantially different size from that of 10pt Noto Sans.

Fortunately we don't need to do anything super complicated to fix this;
just use the implicitHeight of the label, which ensures that the height
is correct for everything.
FIXED-IN: 6.3.6


(cherry picked from commit c35298ff6067f859153959cddfcf2c16943110bf)

8988e894 FolderItemDelegate: use label implichtHeight in frame size calculation

Co-authored-by: Nate Graham <nate@kde.org>

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/7f6c1372a86b70a6181df2dfc134a80e37f08e22
Comment 12 Nate Graham 2025-06-13 13:13:07 UTC
*** Bug 492447 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2025-06-13 13:13:12 UTC
*** Bug 504050 has been marked as a duplicate of this bug. ***