diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-20 15:58:39 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-20 15:58:39 +0100 |
commit | ed570c4835034bbdf36b74731da3d937d3063285 (patch) | |
tree | 272c576c02069506e90b7c219da19a575c43b14b /src/plugins | |
parent | 8171769a728b094e1996a3449ce2d63230c4704a (diff) | |
parent | 1fb79c9f2b50294b989cf2bdd8bfaaf0a458e2a8 (diff) | |
download | qtsvg-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.cpp | 5 |
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 |