Skip to content

Commit

Permalink
fix: default to Qt Vista style on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed May 12, 2024
1 parent 415d2e7 commit bd3ed12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/src/main-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void MainWindow::init(const QStringList &args, const QMap<QString, QString> &par
m_themeLoader = new ThemeLoader(savePath("themes/", true, false), m_settings, this);
m_themeLoader->setTheme(m_settings->value("theme", "Default").toString());
const QStringList baseStyles = QStyleFactory::keys();
const QString defaultStyle = !baseStyles.isEmpty() ? baseStyles.first() : "";
const QString defaultStyle = !baseStyles.isEmpty() ? (baseStyles.contains("windowsvista") ? "windowsvista" : baseStyles.first()) : "";
qApp->setStyle(m_settings->value("baseStyle", defaultStyle).toString());
ui->setupUi(this);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/settings/options-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ OptionsWindow::OptionsWindow(Profile *profile, ThemeLoader *themeLoader, QWidget
}
ui->comboTheme->setCurrentText(settings->value("theme", "Default").toString());
const QStringList baseStyles = QStyleFactory::keys();
const QString defaultStyle = !baseStyles.isEmpty() ? baseStyles.first() : "";
const QString defaultStyle = !baseStyles.isEmpty() ? (baseStyles.contains("windowsvista") ? "windowsvista" : baseStyles.first()) : "";
for (const QString &style : baseStyles) {
ui->comboBaseStyle->addItem(style, style);
}
Expand Down

0 comments on commit bd3ed12

Please # to comment.