diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-18 11:44:48 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-18 11:44:49 +0100 |
commit | 22daba4ff9bbc79b33e2ee61fd4219a221f38614 (patch) | |
tree | 59902e7f88569c75693d1eebc4e61a4eb9019971 /src/gui | |
parent | 943cb0999dbbf1da99c1358b81ea3298ee116447 (diff) | |
parent | c53cccc171c2da803cfd247e95c5dd48e5610c3b (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qiconloader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index e67b387981..15ab1b3cd9 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -797,8 +797,12 @@ QPixmap ScalableEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State if (svgIcon.isNull()) svgIcon = QIcon(filename); - // Simply reuse svg icon engine - return svgIcon.pixmap(size, mode, state); + // Bypass QIcon API, as that will scale by device pixel ratio of the + // highest DPR screen since we're not passing on any QWindow. + if (QIconEngine *engine = svgIcon.data_ptr() ? svgIcon.data_ptr()->engine : nullptr) + return engine->pixmap(size, mode, state); + + return QPixmap(); } QPixmap QIconLoaderEngine::pixmap(const QSize &size, QIcon::Mode mode, |