diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-05-25 03:22:17 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-05-25 04:01:38 +0200 |
commit | d2b2d55aa9a4031d1e179534796cbe07bc57080f (patch) | |
tree | c239fa5b79a5fe1459df9f642cf6317cbcfe56b2 /gui/dialogs | |
parent | eb9661370b3697993efd180b9959b2aa448ecc6e (diff) | |
download | MultiMC-d2b2d55aa9a4031d1e179534796cbe07bc57080f.tar MultiMC-d2b2d55aa9a4031d1e179534796cbe07bc57080f.tar.gz MultiMC-d2b2d55aa9a4031d1e179534796cbe07bc57080f.tar.lz MultiMC-d2b2d55aa9a4031d1e179534796cbe07bc57080f.tar.xz MultiMC-d2b2d55aa9a4031d1e179534796cbe07bc57080f.zip |
New flat icon themes from pexner
Squash and rework of commits from robotbrain
Diffstat (limited to 'gui/dialogs')
-rw-r--r-- | gui/dialogs/SettingsDialog.cpp | 30 | ||||
-rw-r--r-- | gui/dialogs/SettingsDialog.ui | 39 |
2 files changed, 66 insertions, 3 deletions
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 @@ <string>Settings</string> </property> <property name="windowIcon"> - <iconset resource="../../graphics.qrc"> + <iconset> <normaloff>:/icons/toolbar/settings</normaloff>:/icons/toolbar/settings</iconset> </property> <property name="modal"> @@ -327,6 +327,43 @@ </widget> </item> <item> + <widget class="QGroupBox" name="themeBox"> + <property name="title"> + <string>Icon Theme</string> + </property> + <layout class="QHBoxLayout" name="themeBoxLayout"> + <item> + <widget class="QComboBox" name="themeComboBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <item> + <property name="text"> + <string>Default</string> + </property> + </item> + <item> + <property name="text"> + <string>Simple</string> + </property> + </item> + <item> + <property name="text"> + <string>Simple (Light Icons)</string> + </property> + </item> + </widget> + </item> + </layout> + </widget> + </item> + <item> <widget class="QGroupBox" name="editorsBox"> <property name="title"> <string>External Editors (leave empty for system default)</string> |