summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2013-09-13 10:42:40 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-13 13:45:43 +0200
commit44a58de2aea6d2ac71efe7261a398effbf139f3f (patch)
treecb1d6ec6d8ecd9f5e835e80934455ca03bb5cf0c
parent30a4114e60ae493c79d3139b46916165978f7b24 (diff)
Fix highdpi CE_HeaderLabel pixmaps in fusion style
Make sure enough pixels is sourced by multiplying the layout rect size with the pixmaps devicePixelRatio. Task-number: QTBUG-31477 Change-Id: I742603c09a65a520587da3eef9479ef7f0c87022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
-rw-r--r--src/widgets/styles/qcommonstyle.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index ba6c222820..aaad4c3331 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1525,7 +1525,10 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
QRect aligned = alignedRect(header->direction, QFlag(header->iconAlignment), pixmap.size() / pixmap.devicePixelRatio(), rect);
QRect inter = aligned.intersected(rect);
- p->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width(), inter.height());
+ p->drawPixmap(inter.x(), inter.y(), pixmap,
+ inter.x() - aligned.x(), inter.y() - aligned.y(),
+ aligned.width() * pixmap.devicePixelRatio(),
+ pixmap.height() * pixmap.devicePixelRatio());
if (header->direction == Qt::LeftToRight)
rect.setLeft(rect.left() + pixw + 2);