From d2b2d55aa9a4031d1e179534796cbe07bc57080f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 25 May 2014 03:22:17 +0200 Subject: New flat icon themes from pexner Squash and rework of commits from robotbrain --- gui/MainWindow.ui | 2 ++ gui/dialogs/SettingsDialog.cpp | 30 ++++++++++++++++++++++++++++-- gui/dialogs/SettingsDialog.ui | 39 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 68 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index b4ae3441..47789449 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -558,6 +558,8 @@ + + diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index 2dd19077..4229ea91 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -316,7 +316,20 @@ void SettingsDialog::applySettings(SettingsObject *s) // Updates s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); s->set("UpdateChannel", m_currentUpdateChannel); - + //FIXME: make generic + switch (ui->themeComboBox->currentIndex()) + { + case 1: + s->set("IconTheme", "pe_dark"); + break; + case 2: + s->set("IconTheme", "pe_light"); + break; + case 0: + default: + s->set("IconTheme", "multimc"); + break; + } // FTB s->set("TrackFTBInstances", ui->trackFtbBox->isChecked()); s->set("FTBLauncherRoot", ui->ftbLauncherBox->text()); @@ -419,7 +432,20 @@ void SettingsDialog::loadSettings(SettingsObject *s) // Updates ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); m_currentUpdateChannel = s->get("UpdateChannel").toString(); - + //FIXME: make generic + auto theme = s->get("IconTheme").toString(); + if (theme == "pe_dark") + { + ui->themeComboBox->setCurrentIndex(1); + } + else if (theme == "pe_light") + { + ui->themeComboBox->setCurrentIndex(2); + } + else + { + ui->themeComboBox->setCurrentIndex(0); + } // FTB ui->trackFtbBox->setChecked(s->get("TrackFTBInstances").toBool()); ui->ftbLauncherBox->setText(s->get("FTBLauncherRoot").toString()); diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index 74ed68d2..d4e90302 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -20,7 +20,7 @@ Settings - + :/icons/toolbar/settings:/icons/toolbar/settings @@ -326,6 +326,43 @@ + + + + Icon Theme + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + + Default + + + + + Simple + + + + + Simple (Light Icons) + + + + + + + -- cgit v1.2.3