From 3a6eecfc2de50dc65253e5a0faf43d5798029008 Mon Sep 17 00:00:00 2001 From: keshavbhatt Date: Wed, 5 May 2021 03:24:16 +0530 Subject: instantly trigger theme switch when user set automatic timer. --- src/settingswidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/settingswidget.cpp b/src/settingswidget.cpp index 2807ab5..40c6c5b 100644 --- a/src/settingswidget.cpp +++ b/src/settingswidget.cpp @@ -405,7 +405,10 @@ void SettingsWidget::on_automaticThemeCheckBox_toggled(bool checked) automaticTheme->setWindowFlag(Qt::Dialog); automaticTheme->setAttribute(Qt::WA_DeleteOnClose,true); connect(automaticTheme,&AutomaticTheme::destroyed,[=](){ - ui->automaticThemeCheckBox->setChecked(settings.value("automaticTheme",false).toBool()); + bool automaticThemeSwitching = settings.value("automaticTheme",false).toBool(); + ui->automaticThemeCheckBox->setChecked(automaticThemeSwitching); + if(automaticThemeSwitching) + themeSwitchTimerTimeout(); updateAutomaticTheme(); }); automaticTheme->show(); -- cgit v1.2.3