diff options
author | MihailNaydenov <garfieldhq@yahoo.com> | 2014-09-24 14:01:31 +0300 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-09-30 10:32:34 +0200 |
commit | c55324aee0e8ba2ef7dd53294cb60e914cb40500 (patch) | |
tree | ffcdce3dfce35869449336d997f7678db8e70dd6 /src/widgets/styles/qwindowsxpstyle.cpp | |
parent | ee911e5616ac0b2a334f3121ad7c5ea5040fb089 (diff) | |
download | qtbase-c55324aee0e8ba2ef7dd53294cb60e914cb40500.tar.gz |
Additional support for devicePixelRatio in CE_MenuItem’s icon painting
FusionStyle and MacStyle have this already, the change just brings it to the others.
Task-number: QTBUG-40277
Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Diffstat (limited to 'src/widgets/styles/qwindowsxpstyle.cpp')
-rw-r--r-- | src/widgets/styles/qwindowsxpstyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index 5cd378acba..624023f627 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -2246,8 +2246,8 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op QPixmap pixmap = checked ? menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, option, widget), mode, QIcon::On) : menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, option, widget), mode); - int pixw = pixmap.width(); - int pixh = pixmap.height(); + const int pixw = pixmap.width() / pixmap.devicePixelRatio(); + const int pixh = pixmap.height() / pixmap.devicePixelRatio(); QRect iconRect(0, 0, pixw, pixh); iconRect.moveCenter(QRect(xpos, y, checkcol, h).center()); QRect vIconRect = visualRect(option->direction, option->rect, iconRect); |