aboutsummaryrefslogtreecommitdiff
path: root/src/settingswidget.cpp
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-05-05 03:24:16 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-05-05 03:24:16 +0530
commit3a6eecfc2de50dc65253e5a0faf43d5798029008 (patch)
tree985495ae48c0655f01ae8f16e914411ac4c6240e /src/settingswidget.cpp
parentd368bf34576605ec15671b2ca5ef5372a16fea33 (diff)
downloadwhatsie-3a6eecfc2de50dc65253e5a0faf43d5798029008.tar.gz
whatsie-3a6eecfc2de50dc65253e5a0faf43d5798029008.zip
instantly trigger theme switch when user set automatic timer.
Diffstat (limited to 'src/settingswidget.cpp')
-rw-r--r--src/settingswidget.cpp5
1 files changed, 4 insertions, 1 deletions
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();