diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-07-31 14:01:38 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-01 16:25:40 +0200 |
commit | 718f248a8921ad310cbb9e099b16f5ffa0c860c1 (patch) | |
tree | 44ffa7f04c47b2b5bab4a11771a9bd0e38c26e85 /src/widgets/styles/qfusionstyle.cpp | |
parent | a219c8b2cb35790ca07d691e563b5bd921b0fc6e (diff) |
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>
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 8db563379a..d1b5bcc95c 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -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()); |