From b57c4b056d9f7292fb9b0d4c175106845afa23b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Wed, 4 May 2022 17:47:36 +0200 Subject: Try to make sure the wizard looks the same on all platforms This should also avoid problems with the stylesheet (such as overlapping widgets etc.), since it has been developed against Fusion. --- src/gui/newwizard/setupwizardwindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gui/newwizard') diff --git a/src/gui/newwizard/setupwizardwindow.cpp b/src/gui/newwizard/setupwizardwindow.cpp index daa80ff35..a07f2519a 100644 --- a/src/gui/newwizard/setupwizardwindow.cpp +++ b/src/gui/newwizard/setupwizardwindow.cpp @@ -7,6 +7,7 @@ #include "theme.h" #include +#include using namespace std::chrono_literals; @@ -55,6 +56,17 @@ SetupWizardWindow::SetupWizardWindow(QWidget *parent) resize(ocApp()->gui()->settingsDialog()->sizeHintForChild()); + // different styles (e.g., 'Windows', 'Fusion') may require different approaches in the stylesheet + // therefore we want to force a standard style on all platforms + // this further makes sure the wizard (well, its contents) looks exactly the same on all platforms + // Fusion should be available everywhere + auto fusionStyle = QStyleFactory::create(QStringLiteral("Fusion")); + if (OC_ENSURE(fusionStyle != nullptr)) { + _ui->contentWidget->setStyle(fusionStyle); + } else { + qDebug() << "Could not set up default style, wizard contents will be shown using default style"; + } + loadStylesheet(); _ui->transitionProgressIndicator->setFixedSize(32, 32); -- cgit v1.2.3