summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-20 15:58:39 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-20 15:58:39 +0100
commited570c4835034bbdf36b74731da3d937d3063285 (patch)
tree272c576c02069506e90b7c219da19a575c43b14b /src/plugins
parent8171769a728b094e1996a3449ce2d63230c4704a (diff)
parent1fb79c9f2b50294b989cf2bdd8bfaaf0a458e2a8 (diff)
downloadqtsvg-ed570c4835034bbdf36b74731da3d937d3063285.tar.gz
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts: LICENSE.GPLv2 Change-Id: Id7e321e81c3b3af0c17c9d32d25c0bb905974728
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
index acd4c88..0ccf551 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
@@ -220,7 +220,10 @@ void QSvgIconEngine::addFile(const QString &fileName, const QSize &,
void QSvgIconEngine::paint(QPainter *painter, const QRect &rect,
QIcon::Mode mode, QIcon::State state)
{
- painter->drawPixmap(rect, pixmap(rect.size(), mode, state));
+ QSize pixmapSize = rect.size();
+ if (painter->device())
+ pixmapSize *= painter->device()->devicePixelRatio();
+ painter->drawPixmap(rect, pixmap(pixmapSize, mode, state));
}
QString QSvgIconEngine::key() const