diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-06-28 09:32:09 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-07-12 13:24:56 +0200 |
commit | c78ec505293ed576779c0ee7342746cde39281d6 (patch) | |
tree | d10db3317a6cfbbd63e7f4d8f2e315050cf10c3c /src/widgets/dialogs | |
parent | 9e453dacc3855bafd3d7b692d76699c3bf07b9c6 (diff) |
Improve widget painting under dpr>1 by enabling smooth pixmap scaling
Smooth scaling of icons etc. give far better visual results,
particularly with fractional dpr scaling. So enable this generally in
QStylePainter, and make more of the relevant widgets use QStylePainter
instead of QPainter directly.
Differences can be seen in the widgets examples, e.g. textedit,
gallery, stylesheet (Pagefold), mdi.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-96223
Fixes: QTBUG-101058
Change-Id: I3c34a455d097e5f6a6a09d3b020528b4fbda4d85
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 79a83da33a..5b95b62772 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -18,7 +18,7 @@ #include "qlineedit.h" #endif #include <qpointer.h> -#include "qpainter.h" +#include "qstylepainter.h" #include "qwindow.h" #include "qpushbutton.h" #include "qset.h" @@ -386,7 +386,7 @@ void QWizardHeader::setup(const QWizardLayoutInfo &info, const QString &title, void QWizardHeader::paintEvent(QPaintEvent * /* event */) { - QPainter painter(this); + QStylePainter painter(this); painter.drawPixmap(0, 0, bannerPixmap); int x = width() - 2; @@ -3231,7 +3231,7 @@ void QWizard::paintEvent(QPaintEvent * event) if (backgroundPixmap.isNull()) return; - QPainter painter(this); + QStylePainter painter(this); painter.drawPixmap(0, (height() - backgroundPixmap.height()) / 2, backgroundPixmap); } #if QT_CONFIG(style_windowsvista) |