Bug 496928 - Shadow of a floating Plasma panel is drawn with a gap on X11 at any global scale other than 100%
Summary: Shadow of a floating Plasma panel is drawn with a gap on X11 at any global sc...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: 6.2.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-02 11:24 UTC by ratijas
Modified: 2025-02-10 13:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
plasma panel shadow gap (24.32 KB, image/png)
2024-12-02 11:24 UTC, ratijas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2024-12-02 11:24:07 UTC
Created attachment 176286 [details]
plasma panel shadow gap

SUMMARY
The higher the global scale is == the bigger the gap between actual edges of a floating panel and its shadow. It does not matter if the scaling factor is integer or fractional.

STEPS TO REPRODUCE
1. Add a panel, make it floating.
2. Go to Display Configuration, set Global scale to something other than 100%.
3. Restart plasma (or log out and log back in).

OBSERVED RESULT
There is a shadow around the panel, but it floats at some offset from the actual edges, forming a bright and annoying gap. The shadow is not drawn in QtQuick scene (as proven by inspecting the panel's scene via GammaRay), and is probably drawn elsewhere at the compositor level.

EXPECTED RESULT
Shadow should fit the panel.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Graphics Processor: AMD Radeon 780M
Comment 1 TraceyC 2024-12-12 19:16:25 UTC
I was able to confirm this behavior
I tested with a floating panel and set the X11 display to 106.25% and then restarted plasma
It's easiest to see with a plain white desktop
Comment 2 Bug Janitor Service 2025-02-07 15:17:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5173
Comment 3 Niccolò Venerandi 2025-02-10 13:35:41 UTC
Git commit 708dca00f5706049078fedd4f1f5cd05482f78d8 by Niccolò Venerandi.
Committed on 10/02/2025 at 13:35.
Pushed by niccolove into branch 'master'.

Multiply floating panel shadow margin by scale factor on X11

The padding for svg hints on X11 is does not account
for scale factors, so we multiply it on the panel shadows
side.

M  +5    -0    shell/panelshadows.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/708dca00f5706049078fedd4f1f5cd05482f78d8
Comment 4 Niccolò Venerandi 2025-02-10 13:35:55 UTC
Git commit 25f00376ef0f86e725165b2cf396795ba217d2c8 by Niccolò Venerandi.
Committed on 10/02/2025 at 13:35.
Pushed by niccolove into branch 'Plasma/6.3'.

Multiply floating panel shadow margin by scale factor on X11

The padding for svg hints on X11 is does not account
for scale factors, so we multiply it on the panel shadows
side.


(cherry picked from commit 708dca00f5706049078fedd4f1f5cd05482f78d8)

Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>

M  +5    -0    shell/panelshadows.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/25f00376ef0f86e725165b2cf396795ba217d2c8