--m_iconSize for standalone buttons can be changed
dynamically based on user or container preferences.
Such an example could be the window buttons applet
that is resizing its buttons based on panel thickness
or when the applet is on the desktop and the user
resizes it. Previous implementation was failing
because even though m_iconSize was set as NULL for
StandAlone buttons, on the first painting m_iconSize
was set based on Button::geometry(). This of course
was failing because the Button::geometry() could change
afterwards and painting was not considering it to
calculate m_iconSize again.
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.
BUG: 418166
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
This option is off by default and has been for several years, after it
was briefly turned on by default and proved to be unpopular with users,
generating many complaints and bug reports. The line uses a semantically
inappropriate highlight color which is far too visually bright, and it
doesn't look good with any of our header-color-using color schemes.
Arguably it never looked good with older color schemes where the titlebar
and window background use different colors either. Let's remove this
option.
BUG: 427422
FIXED-IN: 5.24
It doesn't make much sense to keep the raw pointer of a weak pointer
that could potentially disappear at any point.
This fixes warnings and just uses references like they're meant to be
used.
Summary:
In addition to the specific Breeze animation settings, KDE has "global" animation settings primarily used for `Qt::UIEffect`s like `Qt::UI_AnimateMenu`, `Qt::UI_AnimateCombo`, `Qt::UI_AnimateTooltip` and `Qt::UI_AnimateToolBox`.
This patch ensures that Breeze use and respect those settings, which both harmonizes with other styles (if `QGuiApplication::desktopSettingsAware()` is true).
Test Plan:
Turn animations on and off in kdeglobals, and see animations turn off and on when using Breeze.
Also makes https://phabricator.kde.org/D17732 work properly with breeze.
Reviewers: #breeze, ngraham
Reviewed By: #breeze, ngraham
Subscribers: meven, cblack, davidedmundson, ngraham, hpereiradacosta, ndavis, plasma-devel, #breeze
Tags: #plasma, #breeze
Differential Revision: https://phabricator.kde.org/D28651