diff options
author | Fabian Müller <fmueller@owncloud.com> | 2022-05-04 18:47:36 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-05-04 18:52:24 +0300 |
commit | b57c4b056d9f7292fb9b0d4c175106845afa23b1 (patch) | |
tree | 07a4a70067afbe5c252e39a6859339d25a8c0260 /src/gui/newwizard | |
parent | 0aa65c5a76ced9aa80e5f395ed6d99e9637b8485 (diff) |
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.
Diffstat (limited to 'src/gui/newwizard')
-rw-r--r-- | src/gui/newwizard/setupwizardwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <QLabel> +#include <QStyleFactory> 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); |