Bug 510359

Summary: Preview on task hover in the taskbar displays uneven margins
Product: [Plasma] plasmashell Reporter: Sanmay <sanmaycjoshi+kde>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED LATER    
Severity: wishlist CC: nate, qydwhotmail
Priority: NOR    
Version First Reported In: 6.4.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sanmay 2025-10-07 19:07:58 UTC
SUMMARY
Preview on task hover in the taskbar displays uneven margins.

STEPS TO REPRODUCE
1. Hover over an open task in the taskbar to view the preview.
2. Observe the placement of the text in the top left corner of the preview.
3. Compare the text positioning with the spacing around the close (cross) button.

OBSERVED RESULT
The text in the top left corner of the preview has insufficient padding, making it appear too close to the borders of the preview. The close button on the right has ample padding, resulting in an uneven visual appearance.

EXPECTED RESULT
There can be consistent padding around the text to create a balanced look. Ideally, the padding should match that of tooltips seen when hovering over applets (e.g., volume applet) on the system tray. This would enhance the overall aesthetics of the preview.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.16.9-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
- Possible approaches to improve the padding:
   1. Adding padding specifically for the text.
   2. Introducing horizontal padding for the entire top row (text and close icon), although this may increase space after the close icon.
   3. Adding an icon (task icon) to the left of the window title to provide some padding, though this may not work for the bottom row in media previews.
- When playing media in web browser, a similar behavior can be seen in preview tooltip's bottom row (song name and media controls). The text appears very close to the borders of preview.
Comment 1 Nate Graham 2025-10-07 19:43:08 UTC
Unfortunately this is not really a solvable problem without a major UI change that's controversial (abandoning the use of flat/unframed buttons). See https://community.kde.org/Get_Involved/Design/Frequently_Discussed_Topics#Measuring_between_variable-size_UI_elements if you want to know the gory details.
Comment 2 Sanmay 2025-10-08 10:42:06 UTC
(In reply to Nate Graham from comment #1)
> Unfortunately this is not really a solvable problem without a major UI
> change that's controversial (abandoning the use of flat/unframed buttons).
> See
> https://community.kde.org/Get_Involved/Design/
> Frequently_Discussed_Topics#Measuring_between_variable-size_UI_elements if
> you want to know the gory details.

I see. For the title of the preview at least, option 3 still seems feasible though:
>    3. Adding an icon (task icon) to the left of the window title to provide some padding, 
>        though this may not work for the bottom row in media previews.

Also, I noticed that Status and Notifications windows (the one you get when you click the arrow on System Tray) has a good space to the left of the text (between 'Status and Notifications' and the borders). If this may be recreated for the preview, then it may be sufficient.
Comment 3 Nate Graham 2025-10-08 19:18:01 UTC
What icon should we add? The window's own icon? Then it would display the same thing as the icon you have your pointer hovered over, and would look redundant and we'd get bug reports about *that*. :)
Comment 4 Sanmay 2025-10-09 10:35:15 UTC
Hahaha. Ok.