aboutsummaryrefslogtreecommitdiff
path: root/src/settingsdialog.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-21 23:27:24 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-21 23:27:24 +0200
commit60ae6cfdfed5450dac9dd4209685a02b3391eb0f (patch)
tree09184452ea5a68eee32e4e0674b09cf72b91721d /src/settingsdialog.cpp
parente327de2ca9b4b60a94e3df6c5a70568233ccd678 (diff)
downloadkristall-60ae6cfdfed5450dac9dd4209685a02b3391eb0f.tar.gz
Fixes pre-selection of light theme
Diffstat (limited to 'src/settingsdialog.cpp')
-rw-r--r--src/settingsdialog.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
index f2c6307..ebd1664 100644
--- a/src/settingsdialog.cpp
+++ b/src/settingsdialog.cpp
@@ -185,12 +185,13 @@ void SettingsDialog::setOptions(const GenericSettings &options)
{
this->current_options = options;
- if(this->current_options.theme == Theme::light)
- this->ui->ui_theme->setCurrentIndex(0);
- else if(this->current_options.theme == Theme::dark)
- this->ui->ui_theme->setCurrentIndex(1);
- else
- this->ui->ui_theme->setCurrentIndex(0);
+ this->ui->ui_theme->setCurrentIndex(0);
+ for(int i = 0; i < this->ui->ui_theme->count(); i++) {
+ if(this->ui->ui_theme->itemData(i).toInt() == int(options.theme)) {
+ this->ui->ui_theme->setCurrentIndex(i);
+ break;
+ }
+ }
this->ui->start_page->setText(this->current_options.start_page);