NOISSUE herp derp custom icon theme support

* Put icon theme in iconthemes/custom/
* Select 'Custom' in the UI.
* ...
* Maybe it won't explode.
This commit is contained in:
Petr Mrázek 2017-05-04 00:03:47 +02:00
parent e76e6329cd
commit 35836c7709
3 changed files with 17 additions and 0 deletions

View File

@ -537,6 +537,11 @@ void MultiMC::initIcons()
m_icons->directoryChanged(value.toString());
});
ENV.registerIconList(m_icons);
// set icon theme search path!
auto searchPaths = QIcon::themeSearchPaths();
searchPaths.append("iconthemes");
QIcon::setThemeSearchPaths(searchPaths);
}
void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)

View File

@ -314,6 +314,9 @@ void MultiMCPage::applySettings()
case 6:
s->set("IconTheme", "iOS");
break;
case 7:
s->set("IconTheme", "custom");
break;
case 0:
default:
s->set("IconTheme", "multimc");
@ -411,6 +414,10 @@ void MultiMCPage::loadSettings()
{
ui->themeComboBox->setCurrentIndex(6);
}
else if (theme == "custom")
{
ui->themeComboBox->setCurrentIndex(7);
}
else
{
ui->themeComboBox->setCurrentIndex(0);

View File

@ -391,6 +391,11 @@
<string notr="true">iOS</string>
</property>
</item>
<item>
<property name="text">
<string>Custom</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">