diff options
author | saturneric <[email protected]> | 2024-05-11 13:02:37 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-05-11 13:02:37 +0000 |
commit | 4d07173fee2e6b9f6e4e199c373a4a7868ff9e78 (patch) | |
tree | b55cab1dc567a76e1a6e96ecb0d851729aaeede1 | |
parent | fix: use &(exec_contexts.first()) instead of exec_contexts.constData() at qt5... (diff) | |
download | GpgFrontend-4d07173fee2e6b9f6e4e199c373a4a7868ff9e78.tar.gz GpgFrontend-4d07173fee2e6b9f6e4e199c373a4a7868ff9e78.zip |
fix: try to get style name at qt5 env
-rw-r--r-- | src/ui/dialog/settings/SettingsAppearance.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/dialog/settings/SettingsAppearance.cpp b/src/ui/dialog/settings/SettingsAppearance.cpp index 299b30d9..f09f9823 100644 --- a/src/ui/dialog/settings/SettingsAppearance.cpp +++ b/src/ui/dialog/settings/SettingsAppearance.cpp @@ -140,11 +140,20 @@ void AppearanceTab::SetSettings() { auto target_theme_index = ui_->themeComboBox->findText(theme); if (theme.isEmpty() || target_theme_index == -1) { +#ifdef QT5_BUILD + GF_UI_LOG_DEBUG( + "There is not valid theme found from settings, " + "using current theme (qt5): {}", + QApplication::style()->metaObject()->className()); + ui_->themeComboBox->setCurrentIndex(ui_->themeComboBox->findText( + QApplication::style()->metaObject()->className())); +#else GF_UI_LOG_DEBUG( "There is not valid theme found from settings, using current theme: {}", QApplication::style()->name()); ui_->themeComboBox->setCurrentIndex( ui_->themeComboBox->findText(QApplication::style()->name())); +#endif } else { ui_->themeComboBox->setCurrentIndex(target_theme_index); } |