Bug 418166

Summary: Additional frame on context menu with fractional scaling
Product: [Plasma] Breeze Reporter: Matej Mrenica <matejm98mthw>
Component: QStyleAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: artemklim50, bizyaev, bugseforuns, kfm-devel, matejm98mthw, nate
Priority: NOR Keywords: regression
Version: 5.22.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.24
Attachments: Screenshot

Description Matej Mrenica 2020-02-25 10:59:54 UTC
Created attachment 126398 [details]
Screenshot

ADDITIONAL INFORMATION
FHD resolution with 1.25 scaling
Comment 1 Matej Mrenica 2020-02-25 11:18:17 UTC
Also affects titlebar app menus and dropdown menus.
Comment 2 Nate Graham 2020-02-26 18:55:18 UTC
Can reproduce with just `QT_SCALE_FACTOR=1.25 dolphin` and right-clicking anywhere.
Comment 3 Patrick Silva 2021-07-08 14:08:53 UTC
This bug also affects tooltips (of categories in the sidebar of System Settings, for example)
Comment 4 Nate Graham 2021-09-02 18:45:33 UTC
*** Bug 441870 has been marked as a duplicate of this bug. ***
Comment 5 Noah Davis 2021-10-11 20:40:13 UTC
Git commit ee06e26236c52b16e546a7208603c845f4159a0e by Noah Davis, on behalf of Tatsuyuki Ishi.
Committed on 11/10/2021 at 20:39.
Pushed by ndavis into branch 'master'.

shadow: handle DPR outside the renderer

QPainter's auto-scaling is prone to off-by-one rounding errors and draws on
fractional coordinates. With this change, we paint on a 1x DPR QPainter and
scale the shadow offset and strength manually based on DPR.

This resolves an issue with resulting in seams on the right and bottom
edges of a menu due to shadow boundaries being off-by-one.

v2: remove unrelated formatting changes
v3:
- move the DPR helper to ShadowHelper
- retrieve the DPR from the widget instead of the global QGuiApplication
- added BUG reference

M  +0    -2    kdecoration/breezedecoration.cpp
M  +0    -4    kstyle/breezehelper.cpp
M  +0    -3    kstyle/breezehelper.h
M  +1    -1    kstyle/breezemdiwindowshadow.cpp
M  +16   -10   kstyle/breezeshadowhelper.cpp
M  +15   -1    kstyle/breezeshadowhelper.h
M  +1    -7    libbreezecommon/breezeboxshadowrenderer.cpp
M  +0    -7    libbreezecommon/breezeboxshadowrenderer.h

https://invent.kde.org/plasma/breeze/commit/ee06e26236c52b16e546a7208603c845f4159a0e