QIcon::pixmap() add a note about the changed behavior
With Qt6.8 QIcon::pixmap() no longer scales the size by the devicePixelRatio passed to QIconEngine::scaledPixmap(). This means that external icon engines now must be adjusted to honor this change. [ChangeLog][Important Behavior Change] QIcon::pixmap() is fixed to no longer scale the size, passed to QIconEngine::scaledPixmap(), by the devicePixelRatio. Change-Id: Ic93e10a81cd58fba4580c3f1522cc27e2b05cea5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ecc13e3d41af89bd195e6f173b2c96d2295f407e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
108162274b
commit
61b9195fc2
@ -904,6 +904,10 @@ QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const
|
||||
might be smaller than requested, but never larger, unless the device-pixel ratio
|
||||
of the returned pixmap is larger than 1.
|
||||
|
||||
\note Prior to Qt 6.8 this function wronlgy passed the device dependent pixmap size to
|
||||
QIconEngine::scaledPixmap(), since Qt 6.8 it's the device independent size (not scaled
|
||||
with the \a devicePixelRatio).
|
||||
|
||||
\sa actualSize(), paint()
|
||||
*/
|
||||
QPixmap QIcon::pixmap(const QSize &size, qreal devicePixelRatio, Mode mode, State state) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user