summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/styles/windowsvista/qwindowsvistastyle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
index 016fd3a6cc..86db78429c 100644
--- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
@@ -104,7 +104,8 @@ bool canAnimate(const QStyleOption *option) {
static inline QImage createAnimationBuffer(const QStyleOption *option, const QWidget *widget)
{
- const int devicePixelRatio = widget ? widget->devicePixelRatio() : 1;
+ const qreal devicePixelRatio = widget
+ ? widget->devicePixelRatioF() : qApp->devicePixelRatio();
QImage result(option->rect.size() * devicePixelRatio, QImage::Format_ARGB32_Premultiplied);
result.setDevicePixelRatio(devicePixelRatio);
result.fill(0);