From 35836c7709fec86f1e005528482f7b22fd07c935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 4 May 2017 00:03:47 +0200 Subject: NOISSUE herp derp custom icon theme support * Put icon theme in iconthemes/custom/ * Select 'Custom' in the UI. * ... * Maybe it won't explode. --- application/MultiMC.cpp | 5 +++++ application/pages/global/MultiMCPage.cpp | 7 +++++++ application/pages/global/MultiMCPage.ui | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index d9d59aa6..18314371 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -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) diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp index 47d79d98..4073f6b7 100644 --- a/application/pages/global/MultiMCPage.cpp +++ b/application/pages/global/MultiMCPage.cpp @@ -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); diff --git a/application/pages/global/MultiMCPage.ui b/application/pages/global/MultiMCPage.ui index bf2b4da7..0b966876 100644 --- a/application/pages/global/MultiMCPage.ui +++ b/application/pages/global/MultiMCPage.ui @@ -391,6 +391,11 @@ iOS + + + Custom + + -- cgit v1.2.3