Merge branch 'feature_theme_support' into develop
Conflicts: main.cpp
This commit is contained in:
@ -500,6 +500,8 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="../resources/pe_dark/pe_dark.qrc"/>
|
||||
<include location="../resources/pe_light/pe_light.qrc"/>
|
||||
<include location="../resources/multimc/multimc.qrc"/>
|
||||
<include location="../resources/instances/instances.qrc"/>
|
||||
</resources>
|
||||
|
@ -326,7 +326,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());
|
||||
@ -429,7 +442,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());
|
||||
|
@ -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">
|
||||
@ -326,6 +326,43 @@
|
||||
</layout>
|
||||
</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">
|
||||
|
Reference in New Issue
Block a user