mirror of
https://github.com/zealdocs/zeal.git
synced 2026-08-29 08:34:50 +08:00
fix(ui): reapply web dark mode on scheme change
This commit is contained in:
@@ -53,6 +53,7 @@ Settings::Settings(QObject *parent)
|
||||
connect(qApp->styleHints(), &QStyleHints::colorSchemeChanged, this, [this]() {
|
||||
if (contentAppearance == ContentAppearance::Automatic) {
|
||||
applyColorScheme();
|
||||
emit updated();
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
@@ -327,11 +327,12 @@ void SettingsDialog::saveSettings()
|
||||
|
||||
settings->isIgnoreSslErrorsEnabled = ui->ignoreSslErrorsCheckBox->isChecked();
|
||||
|
||||
settings->save();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
// Must precede save(), so that updated() is emitted with the effective scheme.
|
||||
settings->applyColorScheme();
|
||||
#endif
|
||||
|
||||
settings->save();
|
||||
}
|
||||
|
||||
} // namespace Zeal::WidgetUi
|
||||
|
||||
Reference in New Issue
Block a user