Skip to content

Commit

Permalink
Connect theme settings to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanW3 committed Feb 1, 2019
1 parent a9844af commit 6f35bcb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HiveWE/SettingsEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SettingsEditor::SettingsEditor(QWidget* parent) : QDialog(parent) {
ui.setupUi(this);
QSettings settings;
ui.testArgs->setText(settings.value("testArgs").toString());
ui.theme->setCurrentIndex((settings.value("theme").toString())=="Dark");

connect(ui.buttonBox, &QDialogButtonBox::accepted, [&]() {
save();
Expand All @@ -21,4 +22,5 @@ SettingsEditor::SettingsEditor(QWidget* parent) : QDialog(parent) {
void SettingsEditor::save() const {
QSettings settings;
settings.setValue("testArgs", ui.testArgs->text());
settings.setValue("theme", ui.theme->currentText());
}

0 comments on commit 6f35bcb

Please sign in to comment.