GH-796 Icon theme loading workaround
Replacing the Qt machinery with other Qt machinery under our control
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include "gui/pages/BasePage.h"
|
||||
|
||||
#include "logic/auth/MojangAccountList.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -42,10 +43,10 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
auto icon = QIcon::fromTheme("accounts");
|
||||
auto icon = MMC->getThemedIcon("accounts");
|
||||
if(icon.isNull())
|
||||
{
|
||||
icon = QIcon::fromTheme("noaccount");
|
||||
icon = MMC->getThemedIcon("noaccount");
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "gui/pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
namespace Ui {
|
||||
class ExternalToolsPage;
|
||||
@ -37,10 +38,10 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
auto icon = QIcon::fromTheme("externaltools");
|
||||
auto icon = MMC->getThemedIcon("externaltools");
|
||||
if(icon.isNull())
|
||||
{
|
||||
icon = QIcon::fromTheme("loadermods");
|
||||
icon = MMC->getThemedIcon("loadermods");
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "logic/java/JavaChecker.h"
|
||||
#include "gui/pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
class SettingsObject;
|
||||
|
||||
@ -42,7 +43,7 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
return QIcon::fromTheme("java");
|
||||
return MMC->getThemedIcon("java");
|
||||
}
|
||||
QString id() const override
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "logic/java/JavaChecker.h"
|
||||
#include "gui/pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
class SettingsObject;
|
||||
|
||||
@ -42,7 +43,7 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
return QIcon::fromTheme("minecraft");
|
||||
return MMC->getThemedIcon("minecraft");
|
||||
}
|
||||
QString id() const override
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ void MultiMCPage::applySettings()
|
||||
|
||||
if(original != s->get("IconTheme"))
|
||||
{
|
||||
QIcon::setThemeName(s->get("IconTheme").toString());
|
||||
MMC->setIconTheme(s->get("IconTheme").toString());
|
||||
}
|
||||
|
||||
// Console settings
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "logic/java/JavaChecker.h"
|
||||
#include "gui/pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
class QTextCharFormat;
|
||||
class SettingsObject;
|
||||
@ -43,7 +44,7 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
return QIcon::fromTheme("multimc");
|
||||
return MMC->getThemedIcon("multimc");
|
||||
}
|
||||
QString id() const override
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "logic/java/JavaChecker.h"
|
||||
#include "gui/pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -40,7 +41,7 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
return QIcon::fromTheme("proxy");
|
||||
return MMC->getThemedIcon("proxy");
|
||||
}
|
||||
QString id() const override
|
||||
{
|
||||
|
Reference in New Issue
Block a user