diff options
Diffstat (limited to 'src/widgets/dialogs/qwizard.cpp')
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index f6f540f57c..40db586f0e 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -1595,23 +1595,25 @@ bool QWizardPrivate::handleAeroStyleChange() bool vistaMargins = false; if (isVistaThemeEnabled()) { + const int topOffset = vistaHelper->topOffset(); + const int topPadding = vistaHelper->topPadding(); if (isVistaThemeEnabled(QVistaHelper::VistaAero)) { if (isWindow) { vistaHelper->setDWMTitleBar(QVistaHelper::ExtendedTitleBar); q->installEventFilter(vistaHelper); } q->setMouseTracking(true); - antiFlickerWidget->move(0, vistaHelper->titleBarSize() + vistaHelper->topOffset()); + antiFlickerWidget->move(0, vistaHelper->titleBarSize() + topOffset); vistaHelper->backButton()->move( - 0, vistaHelper->topOffset() // ### should ideally work without the '+ 1' - - qMin(vistaHelper->topOffset(), vistaHelper->topPadding() + 1)); + 0, topOffset // ### should ideally work without the '+ 1' + - qMin(topOffset, topPadding + 1)); vistaMargins = true; vistaHelper->backButton()->show(); } else { if (isWindow) vistaHelper->setDWMTitleBar(QVistaHelper::NormalTitleBar); q->setMouseTracking(true); - antiFlickerWidget->move(0, vistaHelper->topOffset()); + antiFlickerWidget->move(0, topOffset); vistaHelper->backButton()->move(0, -1); // ### should ideally work with (0, 0) } if (isWindow) @@ -2575,7 +2577,7 @@ void QWizard::setWizardStyle(WizardStyle style) //Send a resizeevent since the antiflicker widget probably needs a new size //because of the backbutton in the window title QResizeEvent ev(geometry().size(), geometry().size()); - QApplication::sendEvent(this, &ev); + QCoreApplication::sendEvent(this, &ev); } #endif d->updateLayout(); @@ -3257,7 +3259,11 @@ void QWizard::paintEvent(QPaintEvent * event) /*! \reimp */ +# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +bool QWizard::nativeEvent(const QByteArray &eventType, void *message, qintptr *result) +# else bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *result) +# endif { #if QT_CONFIG(style_windowsvista) Q_D(QWizard); |