Bug 418166 - Additional frame on context menu with fractional scaling
Summary: Additional frame on context menu with fractional scaling
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (show other bugs)
Version: 5.22.3
Platform: Archlinux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: regression
: 441870 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-25 10:59 UTC by Matej Mrenica
Modified: 2021-10-11 20:41 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments
Screenshot (29.13 KB, image/png)
2020-02-25 10:59 UTC, Matej Mrenica
Details

Note You need to log in before you can comment on or make changes to this bug.
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