Fix high DPI icons in menu items
The position of high DPI icons is wrong in the Fusion style because the pixel resolution is not taking into account when centering them. Task-number: QTBUG-40277 Change-Id: I3593ed461ea57543c3ddfd473105fdc698789132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
a219c8b2cb
commit
718f248a89
@ -1608,8 +1608,8 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
|
||||
else
|
||||
pixmap = menuItem->icon.pixmap(iconSize, mode);
|
||||
|
||||
int pixw = pixmap.width();
|
||||
int pixh = pixmap.height();
|
||||
const int pixw = pixmap.width() / pixmap.devicePixelRatio();
|
||||
const int pixh = pixmap.height() / pixmap.devicePixelRatio();
|
||||
|
||||
QRect pmr(0, 0, pixw, pixh);
|
||||
pmr.moveCenter(vCheckRect.center());
|
||||
|
Loading…
Reference in New Issue
Block a user