Skip to content

Commit

Permalink
Try to make sure the wizard looks the same on all platforms
Browse files Browse the repository at this point in the history
This should also avoid problems with the stylesheet (such as overlapping widgets etc.), since it has been developed against Fusion.
  • Loading branch information
Fabian Müller authored and TheOneRing committed May 4, 2022
1 parent 0aa65c5 commit b57c4b0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/newwizard/setupwizardwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "theme.h"

#include <QLabel>
#include <QStyleFactory>

using namespace std::chrono_literals;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b57c4b0

Please sign in to comment.