summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-03-01 22:20:57 +0100
committerPetr Mrázek <peterix@gmail.com>2015-03-01 22:20:57 +0100
commitceec70e014db629aa8ba3472839cc42781d73d4c (patch)
tree1de0150b51fceb85d9ffa330b3dcd70580b33082 /gui
parentef34cafe174271a423418d7eb68c4b4096642223 (diff)
downloadMultiMC-ceec70e014db629aa8ba3472839cc42781d73d4c.tar
MultiMC-ceec70e014db629aa8ba3472839cc42781d73d4c.tar.gz
MultiMC-ceec70e014db629aa8ba3472839cc42781d73d4c.tar.lz
MultiMC-ceec70e014db629aa8ba3472839cc42781d73d4c.tar.xz
MultiMC-ceec70e014db629aa8ba3472839cc42781d73d4c.zip
GH-796 Icon theme loading workaround
Replacing the Qt machinery with other Qt machinery under our control
Diffstat (limited to 'gui')
-rw-r--r--gui/MainWindow.cpp295
-rw-r--r--gui/MainWindow.ui517
-rw-r--r--gui/dialogs/AboutDialog.cpp2
-rw-r--r--gui/pages/InstanceSettingsPage.h3
-rw-r--r--gui/pages/LegacyJarModPage.h3
-rw-r--r--gui/pages/LegacyUpgradePage.h3
-rw-r--r--gui/pages/LogPage.h3
-rw-r--r--gui/pages/ModFolderPage.h3
-rw-r--r--gui/pages/NotesPage.h5
-rw-r--r--gui/pages/OtherLogsPage.h3
-rw-r--r--gui/pages/ScreenshotsPage.cpp3
-rw-r--r--gui/pages/ScreenshotsPage.h3
-rw-r--r--gui/pages/global/AccountListPage.h5
-rw-r--r--gui/pages/global/ExternalToolsPage.h5
-rw-r--r--gui/pages/global/JavaPage.h3
-rw-r--r--gui/pages/global/MinecraftPage.h3
-rw-r--r--gui/pages/global/MultiMCPage.cpp2
-rw-r--r--gui/pages/global/MultiMCPage.h3
-rw-r--r--gui/pages/global/ProxyPage.h3
-rw-r--r--gui/widgets/PageContainer.cpp3
-rw-r--r--gui/widgets/ServerStatus.cpp8
21 files changed, 331 insertions, 547 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index fbb575a0..0231dd44 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -20,7 +20,292 @@
#include "BuildConfig.h"
#include "MainWindow.h"
-#include "ui_MainWindow.h"
+
+
+#include <QtCore/QVariant>
+#include <QtWidgets/QAction>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QButtonGroup>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QHeaderView>
+#include <QtWidgets/QMainWindow>
+#include <QtWidgets/QStatusBar>
+#include <QtWidgets/QToolBar>
+#include <QtWidgets/QWidget>
+
+class Ui_MainWindow
+{
+public:
+ QAction *actionAddInstance;
+ QAction *actionViewInstanceFolder;
+ QAction *actionRefresh;
+ QAction *actionViewCentralModsFolder;
+ QAction *actionCheckUpdate;
+ QAction *actionSettings;
+ QAction *actionReportBug;
+ QAction *actionPatreon;
+ QAction *actionMoreNews;
+ QAction *actionAbout;
+ QAction *actionLaunchInstance;
+ QAction *actionRenameInstance;
+ QAction *actionChangeInstGroup;
+ QAction *actionChangeInstIcon;
+ QAction *actionEditInstNotes;
+ QAction *actionEditInstance;
+ QAction *actionViewSelectedInstFolder;
+ QAction *actionDeleteInstance;
+ QAction *actionConfig_Folder;
+ QAction *actionCAT;
+ QAction *actionCopyInstance;
+ QAction *actionManageAccounts;
+ QAction *actionLaunchInstanceOffline;
+ QAction *actionScreenshots;
+ QAction *actionInstanceSettings;
+ QAction *actionExportInstance;
+ QWidget *centralWidget;
+ QHBoxLayout *horizontalLayout;
+ QToolBar *mainToolBar;
+ QStatusBar *statusBar;
+ QToolBar *instanceToolBar;
+ QToolBar *newsToolBar;
+
+ void setupUi(QMainWindow *MainWindow)
+ {
+ if (MainWindow->objectName().isEmpty())
+ {
+ MainWindow->setObjectName(QStringLiteral("MainWindow"));
+ }
+ MainWindow->resize(694, 563);
+ MainWindow->setWindowIcon(MMC->getThemedIcon("multimc"));
+ actionAddInstance = new QAction(MainWindow);
+ actionAddInstance->setObjectName(QStringLiteral("actionAddInstance"));
+ actionAddInstance->setIcon(MMC->getThemedIcon("new"));
+ actionViewInstanceFolder = new QAction(MainWindow);
+ actionViewInstanceFolder->setObjectName(QStringLiteral("actionViewInstanceFolder"));
+ actionViewInstanceFolder->setIcon(MMC->getThemedIcon("viewfolder"));
+ actionRefresh = new QAction(MainWindow);
+ actionRefresh->setObjectName(QStringLiteral("actionRefresh"));
+ actionRefresh->setIcon(MMC->getThemedIcon("refresh"));
+ actionViewCentralModsFolder = new QAction(MainWindow);
+ actionViewCentralModsFolder->setObjectName(QStringLiteral("actionViewCentralModsFolder"));
+ actionViewCentralModsFolder->setIcon(MMC->getThemedIcon("centralmods"));
+ actionCheckUpdate = new QAction(MainWindow);
+ actionCheckUpdate->setObjectName(QStringLiteral("actionCheckUpdate"));
+ actionCheckUpdate->setIcon(MMC->getThemedIcon("checkupdate"));
+ actionSettings = new QAction(MainWindow);
+ actionSettings->setObjectName(QStringLiteral("actionSettings"));
+ actionSettings->setIcon(MMC->getThemedIcon("settings"));
+ actionSettings->setMenuRole(QAction::PreferencesRole);
+ actionReportBug = new QAction(MainWindow);
+ actionReportBug->setObjectName(QStringLiteral("actionReportBug"));
+ actionReportBug->setIcon(MMC->getThemedIcon("bug"));
+ actionPatreon = new QAction(MainWindow);
+ actionPatreon->setObjectName(QStringLiteral("actionPatreon"));
+ actionPatreon->setIcon(MMC->getThemedIcon("patreon"));
+ actionMoreNews = new QAction(MainWindow);
+ actionMoreNews->setObjectName(QStringLiteral("actionMoreNews"));
+ actionMoreNews->setIcon(MMC->getThemedIcon("news"));
+ actionAbout = new QAction(MainWindow);
+ actionAbout->setObjectName(QStringLiteral("actionAbout"));
+ actionAbout->setIcon(MMC->getThemedIcon("about"));
+ actionAbout->setMenuRole(QAction::AboutRole);
+ actionLaunchInstance = new QAction(MainWindow);
+ actionLaunchInstance->setObjectName(QStringLiteral("actionLaunchInstance"));
+ actionRenameInstance = new QAction(MainWindow);
+ actionRenameInstance->setObjectName(QStringLiteral("actionRenameInstance"));
+ actionChangeInstGroup = new QAction(MainWindow);
+ actionChangeInstGroup->setObjectName(QStringLiteral("actionChangeInstGroup"));
+ actionChangeInstIcon = new QAction(MainWindow);
+ actionChangeInstIcon->setObjectName(QStringLiteral("actionChangeInstIcon"));
+ actionChangeInstIcon->setEnabled(true);
+ actionChangeInstIcon->setIcon(QIcon(":/icons/instances/infinity"));
+ actionChangeInstIcon->setIconVisibleInMenu(true);
+ actionEditInstNotes = new QAction(MainWindow);
+ actionEditInstNotes->setObjectName(QStringLiteral("actionEditInstNotes"));
+ actionEditInstance = new QAction(MainWindow);
+ actionEditInstance->setObjectName(QStringLiteral("actionEditInstance"));
+ actionViewSelectedInstFolder = new QAction(MainWindow);
+ actionViewSelectedInstFolder->setObjectName(QStringLiteral("actionViewSelectedInstFolder"));
+ actionDeleteInstance = new QAction(MainWindow);
+ actionDeleteInstance->setObjectName(QStringLiteral("actionDeleteInstance"));
+ actionConfig_Folder = new QAction(MainWindow);
+ actionConfig_Folder->setObjectName(QStringLiteral("actionConfig_Folder"));
+ actionCAT = new QAction(MainWindow);
+ actionCAT->setObjectName(QStringLiteral("actionCAT"));
+ actionCAT->setCheckable(true);
+ actionCAT->setIcon(MMC->getThemedIcon("cat"));
+ actionCopyInstance = new QAction(MainWindow);
+ actionCopyInstance->setObjectName(QStringLiteral("actionCopyInstance"));
+ actionCopyInstance->setIcon(MMC->getThemedIcon("copy"));
+ actionManageAccounts = new QAction(MainWindow);
+ actionManageAccounts->setObjectName(QStringLiteral("actionManageAccounts"));
+ actionLaunchInstanceOffline = new QAction(MainWindow);
+ actionLaunchInstanceOffline->setObjectName(QStringLiteral("actionLaunchInstanceOffline"));
+ actionScreenshots = new QAction(MainWindow);
+ actionScreenshots->setObjectName(QStringLiteral("actionScreenshots"));
+ actionInstanceSettings = new QAction(MainWindow);
+ actionInstanceSettings->setObjectName(QStringLiteral("actionInstanceSettings"));
+ actionExportInstance = new QAction(MainWindow);
+ actionExportInstance->setObjectName(QStringLiteral("actionExportInstance"));
+ centralWidget = new QWidget(MainWindow);
+ centralWidget->setObjectName(QStringLiteral("centralWidget"));
+ horizontalLayout = new QHBoxLayout(centralWidget);
+ horizontalLayout->setSpacing(0);
+ horizontalLayout->setContentsMargins(11, 11, 11, 11);
+ horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
+ horizontalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
+ horizontalLayout->setContentsMargins(0, 0, 0, 0);
+ MainWindow->setCentralWidget(centralWidget);
+ mainToolBar = new QToolBar(MainWindow);
+ mainToolBar->setObjectName(QStringLiteral("mainToolBar"));
+ mainToolBar->setMovable(false);
+ mainToolBar->setAllowedAreas(Qt::TopToolBarArea);
+ mainToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
+ mainToolBar->setFloatable(false);
+ MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
+ statusBar = new QStatusBar(MainWindow);
+ statusBar->setObjectName(QStringLiteral("statusBar"));
+ MainWindow->setStatusBar(statusBar);
+ instanceToolBar = new QToolBar(MainWindow);
+ instanceToolBar->setObjectName(QStringLiteral("instanceToolBar"));
+ instanceToolBar->setEnabled(true);
+ instanceToolBar->setAllowedAreas(Qt::LeftToolBarArea|Qt::RightToolBarArea);
+ instanceToolBar->setIconSize(QSize(80, 80));
+ instanceToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
+ instanceToolBar->setFloatable(false);
+ MainWindow->addToolBar(Qt::RightToolBarArea, instanceToolBar);
+ newsToolBar = new QToolBar(MainWindow);
+ newsToolBar->setObjectName(QStringLiteral("newsToolBar"));
+ newsToolBar->setMovable(false);
+ newsToolBar->setAllowedAreas(Qt::BottomToolBarArea);
+ newsToolBar->setIconSize(QSize(16, 16));
+ newsToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ newsToolBar->setFloatable(false);
+ MainWindow->addToolBar(Qt::BottomToolBarArea, newsToolBar);
+
+ mainToolBar->addAction(actionAddInstance);
+ mainToolBar->addAction(actionCopyInstance);
+ mainToolBar->addSeparator();
+ mainToolBar->addAction(actionViewInstanceFolder);
+ mainToolBar->addAction(actionViewCentralModsFolder);
+ mainToolBar->addAction(actionRefresh);
+ mainToolBar->addSeparator();
+ mainToolBar->addAction(actionCheckUpdate);
+ mainToolBar->addAction(actionSettings);
+ mainToolBar->addSeparator();
+ mainToolBar->addAction(actionReportBug);
+ mainToolBar->addAction(actionAbout);
+ mainToolBar->addSeparator();
+ mainToolBar->addAction(actionPatreon);
+ mainToolBar->addAction(actionCAT);
+ instanceToolBar->addAction(actionChangeInstIcon);
+ instanceToolBar->addAction(actionLaunchInstance);
+ instanceToolBar->addAction(actionLaunchInstanceOffline);
+ instanceToolBar->addAction(actionChangeInstGroup);
+ instanceToolBar->addSeparator();
+ instanceToolBar->addAction(actionEditInstance);
+ instanceToolBar->addAction(actionInstanceSettings);
+ instanceToolBar->addAction(actionEditInstNotes);
+ instanceToolBar->addAction(actionScreenshots);
+ instanceToolBar->addSeparator();
+ instanceToolBar->addAction(actionViewSelectedInstFolder);
+ instanceToolBar->addAction(actionConfig_Folder);
+ instanceToolBar->addSeparator();
+ instanceToolBar->addAction(actionExportInstance);
+ instanceToolBar->addAction(actionDeleteInstance);
+ newsToolBar->addAction(actionMoreNews);
+
+ retranslateUi(MainWindow);
+
+ QMetaObject::connectSlotsByName(MainWindow);
+ } // setupUi
+
+ void retranslateUi(QMainWindow *MainWindow)
+ {
+ MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MultiMC 5", 0));
+ actionAddInstance->setText(QApplication::translate("MainWindow", "Add Instance", 0));
+ actionAddInstance->setToolTip(QApplication::translate("MainWindow", "Add a new instance.", 0));
+ actionAddInstance->setStatusTip(QApplication::translate("MainWindow", "Add a new instance.", 0));
+ actionViewInstanceFolder->setText(QApplication::translate("MainWindow", "View Instance Folder", 0));
+ actionViewInstanceFolder->setToolTip(QApplication::translate("MainWindow", "Open the instance folder in a file browser.", 0));
+ actionViewInstanceFolder->setStatusTip(QApplication::translate("MainWindow", "Open the instance folder in a file browser.", 0));
+ actionRefresh->setText(QApplication::translate("MainWindow", "Refresh", 0));
+ actionRefresh->setToolTip(QApplication::translate("MainWindow", "Reload the instance list.", 0));
+ actionRefresh->setStatusTip(QApplication::translate("MainWindow", "Reload the instance list.", 0));
+ actionViewCentralModsFolder->setText(QApplication::translate("MainWindow", "View Central Mods Folder", 0));
+ actionViewCentralModsFolder->setToolTip(QApplication::translate("MainWindow", "Open the central mods folder in a file browser.", 0));
+ actionViewCentralModsFolder->setStatusTip(QApplication::translate("MainWindow", "Open the central mods folder in a file browser.", 0));
+ actionCheckUpdate->setText(QApplication::translate("MainWindow", "Check for Updates", 0));
+ actionCheckUpdate->setToolTip(QApplication::translate("MainWindow", "Check for new updates for MultiMC", 0));
+ actionCheckUpdate->setStatusTip(QApplication::translate("MainWindow", "Check for new updates for MultiMC", 0));
+ actionSettings->setText(QApplication::translate("MainWindow", "Settings", 0));
+ actionSettings->setToolTip(QApplication::translate("MainWindow", "Change settings.", 0));
+ actionSettings->setStatusTip(QApplication::translate("MainWindow", "Change settings.", 0));
+ actionReportBug->setText(QApplication::translate("MainWindow", "Report a Bug", 0));
+ actionReportBug->setToolTip(QApplication::translate("MainWindow", "Open the bug tracker to report a bug with MultiMC.", 0));
+ actionReportBug->setStatusTip(QApplication::translate("MainWindow", "Open the bug tracker to report a bug with MultiMC.", 0));
+ actionPatreon->setText(QApplication::translate("MainWindow", "Support us on Patreon!", 0));
+ actionPatreon->setToolTip(QApplication::translate("MainWindow", "Open the MultiMC Patreon page.", 0));
+ actionPatreon->setStatusTip(QApplication::translate("MainWindow", "Open the MultiMC Patreon page.", 0));
+ actionMoreNews->setText(QApplication::translate("MainWindow", "More News", 0));
+ actionMoreNews->setIconText(QApplication::translate("MainWindow", "More news...", 0));
+ actionMoreNews->setToolTip(QApplication::translate("MainWindow", "Open the MultiMC development blog to read more news about MultiMC.", 0));
+ actionMoreNews->setStatusTip(QApplication::translate("MainWindow", "Open the MultiMC development blog to read more news about MultiMC.", 0));
+ actionAbout->setText(QApplication::translate("MainWindow", "About MultiMC", 0));
+ actionAbout->setToolTip(QApplication::translate("MainWindow", "View information about MultiMC.", 0));
+ actionAbout->setStatusTip(QApplication::translate("MainWindow", "About MultiMC", 0));
+ actionLaunchInstance->setText(QApplication::translate("MainWindow", "Play", 0));
+ actionLaunchInstance->setToolTip(QApplication::translate("MainWindow", "Launch the selected instance.", 0));
+ actionLaunchInstance->setStatusTip(QApplication::translate("MainWindow", "Launch the selected instance.", 0));
+ actionRenameInstance->setText(QApplication::translate("MainWindow", "Instance Name", 0));
+ actionRenameInstance->setToolTip(QApplication::translate("MainWindow", "Rename the selected instance.", 0));
+ actionRenameInstance->setStatusTip(QApplication::translate("MainWindow", "Rename the selected instance.", 0));
+ actionChangeInstGroup->setText(QApplication::translate("MainWindow", "Change Group", 0));
+ actionChangeInstGroup->setToolTip(QApplication::translate("MainWindow", "Change the selected instance's group.", 0));
+ actionChangeInstGroup->setStatusTip(QApplication::translate("MainWindow", "Change the selected instance's group.", 0));
+ actionChangeInstIcon->setText(QApplication::translate("MainWindow", "Change Icon", 0));
+ actionChangeInstIcon->setToolTip(QApplication::translate("MainWindow", "Change the selected instance's icon.", 0));
+ actionChangeInstIcon->setStatusTip(QApplication::translate("MainWindow", "Change the selected instance's icon.", 0));
+ actionEditInstNotes->setText(QApplication::translate("MainWindow", "Edit Notes", 0));
+ actionEditInstNotes->setToolTip(QApplication::translate("MainWindow", "Edit the notes for the selected instance.", 0));
+ actionEditInstNotes->setStatusTip(QApplication::translate("MainWindow", "Edit the notes for the selected instance.", 0));
+ actionEditInstance->setText(QApplication::translate("MainWindow", "Edit Instance", 0));
+ actionEditInstance->setIconText(QApplication::translate("MainWindow", "Edit Instance", 0));
+ actionEditInstance->setToolTip(QApplication::translate("MainWindow", "Change the instance settings, mods and versions.", 0));
+ actionEditInstance->setStatusTip(QApplication::translate("MainWindow", "Change the instance settings, mods and versions.", 0));
+ actionViewSelectedInstFolder->setText(QApplication::translate("MainWindow", "Instance Folder", 0));
+ actionViewSelectedInstFolder->setToolTip(QApplication::translate("MainWindow", "Open the selected instance's root folder in a file browser.", 0));
+ actionViewSelectedInstFolder->setStatusTip(QApplication::translate("MainWindow", "Open the selected instance's root folder in a file browser.", 0));
+ actionDeleteInstance->setText(QApplication::translate("MainWindow", "Delete", 0));
+ actionDeleteInstance->setToolTip(QApplication::translate("MainWindow", "Delete the selected instance.", 0));
+ actionDeleteInstance->setStatusTip(QApplication::translate("MainWindow", "Delete the selected instance.", 0));
+ actionConfig_Folder->setText(QApplication::translate("MainWindow", "Config Folder", 0));
+ actionConfig_Folder->setToolTip(QApplication::translate("MainWindow", "Open the instance's config folder", 0));
+ actionCAT->setText(QApplication::translate("MainWindow", "Meow", 0));
+ actionCAT->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p align=\"center\">It's a fluffy kitty :3</p></body></html>", 0));
+ actionCopyInstance->setText(QApplication::translate("MainWindow", "Copy Instance", 0));
+ actionCopyInstance->setToolTip(QApplication::translate("MainWindow", "Copy the selected instance.", 0));
+ actionCopyInstance->setStatusTip(QApplication::translate("MainWindow", "Add a new instance.", 0));
+ actionManageAccounts->setText(QApplication::translate("MainWindow", "Manage Accounts", 0));
+ actionManageAccounts->setToolTip(QApplication::translate("MainWindow", "Manage your Mojang or Minecraft accounts.", 0));
+ actionLaunchInstanceOffline->setText(QApplication::translate("MainWindow", "Play Offline", 0));
+ actionLaunchInstanceOffline->setToolTip(QApplication::translate("MainWindow", "Launch the selected instance in offline mode.", 0));
+ actionLaunchInstanceOffline->setStatusTip(QApplication::translate("MainWindow", "Launch the selected instance.", 0));
+ actionScreenshots->setText(QApplication::translate("MainWindow", "Manage Screenshots", 0));
+ actionScreenshots->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>View and upload screenshots for this instance</p></body></html>", 0));
+ actionInstanceSettings->setText(QApplication::translate("MainWindow", "Instance Settings", 0));
+ actionInstanceSettings->setToolTip(QApplication::translate("MainWindow", "Change the settings specific to the instance", 0));
+ actionExportInstance->setText(QApplication::translate("MainWindow", "Export Instance", 0));
+ mainToolBar->setWindowTitle(QApplication::translate("MainWindow", "Main Toolbar", 0));
+ instanceToolBar->setWindowTitle(QApplication::translate("MainWindow", "Instance Toolbar", 0));
+ newsToolBar->setWindowTitle(QApplication::translate("MainWindow", "News Toolbar", 0));
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class MainWindow: public Ui_MainWindow {};
+} // namespace Ui
#include <QMenu>
#include <QMessageBox>
@@ -152,7 +437,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// Add the news label to the news toolbar.
{
newsLabel = new QToolButton();
- newsLabel->setIcon(QIcon::fromTheme("news"));
+ newsLabel->setIcon(MMC->getThemedIcon("news"));
newsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
newsLabel->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
ui->newsToolBar->insertWidget(ui->actionMoreNews, newsLabel);
@@ -248,7 +533,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
accountMenuButton->setMenu(accountMenu);
accountMenuButton->setPopupMode(QToolButton::InstantPopup);
accountMenuButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
- accountMenuButton->setIcon(QIcon::fromTheme("noaccount"));
+ accountMenuButton->setIcon(MMC->getThemedIcon("noaccount"));
QWidgetAction *accountMenuButtonAction = new QWidgetAction(this);
accountMenuButtonAction->setDefaultWidget(accountMenuButton);
@@ -514,7 +799,7 @@ void MainWindow::repopulateAccountsMenu()
QAction *action = new QAction(tr("No Default Account"), this);
action->setCheckable(true);
- action->setIcon(QIcon::fromTheme("noaccount"));
+ action->setIcon(MMC->getThemedIcon("noaccount"));
action->setData("");
if (active_username.isEmpty())
{
@@ -568,7 +853,7 @@ void MainWindow::activeAccountChanged()
}
// Set the icon to the "no account" icon.
- accountMenuButton->setIcon(QIcon::fromTheme("noaccount"));
+ accountMenuButton->setIcon(MMC->getThemedIcon("noaccount"));
}
bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui
deleted file mode 100644
index 800862d1..00000000
--- a/gui/MainWindow.ui
+++ /dev/null
@@ -1,517 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>694</width>
- <height>563</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>MultiMC 5</string>
- </property>
- <property name="windowIcon">
- <iconset theme="multimc"/>
- </property>
- <widget class="QWidget" name="centralWidget">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- </layout>
- </widget>
- <widget class="QToolBar" name="mainToolBar">
- <property name="windowTitle">
- <string>Main Toolbar</string>
- </property>
- <property name="movable">
- <bool>false</bool>
- </property>
- <property name="allowedAreas">
- <set>Qt::TopToolBarArea</set>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonIconOnly</enum>
- </property>
- <property name="floatable">
- <bool>false</bool>
- </property>
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- <addaction name="actionAddInstance"/>
- <addaction name="actionCopyInstance"/>
- <addaction name="separator"/>
- <addaction name="actionViewInstanceFolder"/>
- <addaction name="actionViewCentralModsFolder"/>
- <addaction name="actionRefresh"/>
- <addaction name="separator"/>
- <addaction name="actionCheckUpdate"/>
- <addaction name="actionSettings"/>
- <addaction name="separator"/>
- <addaction name="actionReportBug"/>
- <addaction name="actionAbout"/>
- <addaction name="separator"/>
- <addaction name="actionPatreon"/>
- <addaction name="actionCAT"/>
- </widget>
- <widget class="QStatusBar" name="statusBar"/>
- <widget class="QToolBar" name="instanceToolBar">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="windowTitle">
- <string>Instance Toolbar</string>
- </property>
- <property name="allowedAreas">
- <set>Qt::LeftToolBarArea|Qt::RightToolBarArea</set>
- </property>
- <property name="iconSize">
- <size>
- <width>80</width>
- <height>80</height>
- </size>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonIconOnly</enum>
- </property>
- <property name="floatable">
- <bool>false</bool>
- </property>
- <attribute name="toolBarArea">
- <enum>RightToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- <addaction name="actionChangeInstIcon"/>
- <addaction name="actionLaunchInstance"/>
- <addaction name="actionLaunchInstanceOffline"/>
- <addaction name="actionChangeInstGroup"/>
- <addaction name="separator"/>
- <addaction name="actionEditInstance"/>
- <addaction name="actionInstanceSettings"/>
- <addaction name="actionEditInstNotes"/>
- <addaction name="actionScreenshots"/>
- <addaction name="separator"/>
- <addaction name="actionViewSelectedInstFolder"/>
- <addaction name="actionConfig_Folder"/>
- <addaction name="separator"/>
- <addaction name="actionExportInstance"/>
- <addaction name="actionDeleteInstance"/>
- </widget>
- <widget class="QToolBar" name="newsToolBar">
- <property name="windowTitle">
- <string>News Toolbar</string>
- </property>
- <property name="movable">
- <bool>false</bool>
- </property>
- <property name="allowedAreas">
- <set>Qt::BottomToolBarArea</set>
- </property>
- <property name="iconSize">
- <size>
- <width>16</width>
- <height>16</height>
- </size>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="floatable">
- <bool>false</bool>
- </property>
- <attribute name="toolBarArea">
- <enum>BottomToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- <addaction name="actionMoreNews"/>
- </widget>
- <action name="actionAddInstance">
- <property name="icon">
- <iconset theme="new">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Add Instance</string>
- </property>
- <property name="toolTip">
- <string>Add a new instance.</string>
- </property>
- <property name="statusTip">
- <string>Add a new instance.</string>
- </property>
- </action>
- <action name="actionViewInstanceFolder">
- <property name="icon">
- <iconset theme="viewfolder">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>View Instance Folder</string>
- </property>
- <property name="toolTip">
- <string>Open the instance folder in a file browser.</string>
- </property>
- <property name="statusTip">
- <string>Open the instance folder in a file browser.</string>
- </property>
- </action>
- <action name="actionRefresh">
- <property name="icon">
- <iconset theme="refresh">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Refresh</string>
- </property>
- <property name="toolTip">
- <string>Reload the instance list.</string>
- </property>
- <property name="statusTip">
- <string>Reload the instance list.</string>
- </property>
- </action>
- <action name="actionViewCentralModsFolder">
- <property name="icon">
- <iconset theme="centralmods">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>View Central Mods Folder</string>
- </property>
- <property name="toolTip">
- <string>Open the central mods folder in a file browser.</string>
- </property>
- <property name="statusTip">
- <string>Open the central mods folder in a file browser.</string>
- </property>
- </action>
- <action name="actionCheckUpdate">
- <property name="icon">
- <iconset theme="checkupdate">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Check for Updates</string>
- </property>
- <property name="toolTip">
- <string>Check for new updates for MultiMC</string>
- </property>
- <property name="statusTip">
- <string>Check for new updates for MultiMC</string>
- </property>
- </action>
- <action name="actionSettings">
- <property name="icon">
- <iconset theme="settings">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Settings</string>
- </property>
- <property name="toolTip">
- <string>Change settings.</string>
- </property>
- <property name="statusTip">
- <string>Change settings.</string>
- </property>
- <property name="menuRole">
- <enum>QAction::PreferencesRole</enum>
- </property>
- </action>
- <action name="actionReportBug">
- <property name="icon">
- <iconset theme="bug">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Report a Bug</string>
- </property>
- <property name="toolTip">
- <string>Open the bug tracker to report a bug with MultiMC.</string>
- </property>
- <property name="statusTip">
- <string>Open the bug tracker to report a bug with MultiMC.</string>
- </property>
- </action>
- <action name="actionPatreon">
- <property name="icon">
- <iconset theme="patreon">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Support us on Patreon!</string>
- </property>
- <property name="toolTip">
- <string>Open the MultiMC Patreon page.</string>
- </property>
- <property name="statusTip">
- <string>Open the MultiMC Patreon page.</string>
- </property>
- </action>
- <action name="actionMoreNews">
- <property name="icon">
- <iconset theme="news">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>More News</string>
- </property>
- <property name="iconText">
- <string>More news...</string>
- </property>
- <property name="toolTip">
- <string>Open the MultiMC development blog to read more news about MultiMC.</string>
- </property>
- <property name="statusTip">
- <string>Open the MultiMC development blog to read more news about MultiMC.</string>
- </property>
- </action>
- <action name="actionAbout">
- <property name="icon">
- <iconset theme="about">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>About MultiMC</string>
- </property>
- <property name="toolTip">
- <string>View information about MultiMC.</string>
- </property>
- <property name="statusTip">
- <string>About MultiMC</string>
- </property>
- <property name="menuRole">
- <enum>QAction::AboutRole</enum>
- </property>
- </action>
- <action name="actionLaunchInstance">
- <property name="text">
- <string>Play</string>
- </property>
- <property name="toolTip">
- <string>Launch the selected instance.</string>
- </property>
- <property name="statusTip">
- <string>Launch the selected instance.</string>
- </property>
- </action>
- <action name="actionRenameInstance">
- <property name="text">
- <string>Instance Name</string>
- </property>
- <property name="toolTip">
- <string>Rename the selected instance.</string>
- </property>
- <property name="statusTip">
- <string>Rename the selected instance.</string>
- </property>
- </action>
- <action name="actionChangeInstGroup">
- <property name="text">
- <string>Change Group</string>
- </property>
- <property name="toolTip">
- <string>Change the selected instance's group.</string>
- </property>
- <property name="statusTip">
- <string>Change the selected instance's group.</string>
- </property>
- </action>
- <action name="actionChangeInstIcon">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="icon">
- <iconset resource="../resources/instances/instances.qrc">
- <normaloff>:/icons/instances/infinity</normaloff>:/icons/instances/infinity</iconset>
- </property>
- <property name="text">
- <string>Change Icon</string>
- </property>
- <property name="toolTip">
- <string>Change the selected instance's icon.</string>
- </property>
- <property name="statusTip">
- <string>Change the selected instance's icon.</string>
- </property>
- <property name="iconVisibleInMenu">
- <bool>true</bool>
- </property>
- </action>
- <action name="actionEditInstNotes">
- <property name="text">
- <string>Edit Notes</string>
- </property>
- <property name="toolTip">
- <string>Edit the notes for the selected instance.</string>
- </property>
- <property name="statusTip">
- <string>Edit the notes for the selected instance.</string>
- </property>
- </action>
- <action name="actionEditInstance">
- <property name="text">
- <string>Edit Instance</string>
- </property>
- <property name="iconText">
- <string>Edit Instance</string>
- </property>
- <property name="toolTip">
- <string>Change the instance settings, mods and versions.</string>
- </property>
- <property name="statusTip">
- <string>Change the instance settings, mods and versions.</string>
- </property>
- </action>
- <action name="actionViewSelectedInstFolder">
- <property name="text">
- <string>Instance Folder</string>
- </property>
- <property name="toolTip">
- <string>Open the selected instance's root folder in a file browser.</string>
- </property>
- <property name="statusTip">
- <string>Open the selected instance's root folder in a file browser.</string>
- </property>
- </action>
- <action name="actionDeleteInstance">
- <property name="text">
- <string>Delete</string>
- </property>
- <property name="toolTip">
- <string>Delete the selected instance.</string>
- </property>
- <property name="statusTip">
- <string>Delete the selected instance.</string>
- </property>
- </action>
- <action name="actionConfig_Folder">
- <property name="text">
- <string>Config Folder</string>
- </property>
- <property name="toolTip">
- <string>Open the instance's config folder</string>
- </property>
- </action>
- <action name="actionCAT">
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="icon">
- <iconset theme="cat">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Meow</string>
- </property>
- <property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;It's a fluffy kitty :3&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- </action>
- <action name="actionCopyInstance">
- <property name="icon">
- <iconset theme="copy">
- <normaloff/>
- </iconset>
- </property>
- <property name="text">
- <string>Copy Instance</string>
- </property>
- <property name="toolTip">
- <string>Copy the selected instance.</string>
- </property>
- <property name="statusTip">
- <string>Add a new instance.</string>
- </property>
- </action>
- <action name="actionManageAccounts">
- <property name="text">
- <string>Manage Accounts</string>
- </property>
- <property name="toolTip">
- <string>Manage your Mojang or Minecraft accounts.</string>
- </property>
- </action>
- <action name="actionLaunchInstanceOffline">
- <property name="text">
- <string>Play Offline</string>
- </property>
- <property name="toolTip">
- <string>Launch the selected instance in offline mode.</string>
- </property>
- <property name="statusTip">
- <string>Launch the selected instance.</string>
- </property>
- </action>
- <action name="actionScreenshots">
- <property name="text">
- <string>Manage Screenshots</string>
- </property>
- <property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;View and upload screenshots for this instance&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- </action>
- <action name="actionInstanceSettings">
- <property name="text">
- <string>Instance Settings</string>
- </property>
- <property name="toolTip">
- <string>Change the settings specific to the instance</string>
- </property>
- </action>
- <action name="actionExportInstance">
- <property name="text">
- <string>Export Instance</string>
- </property>
- </action>
- </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/pe_blue/pe_blue.qrc"/>
- <include location="../resources/pe_colored/pe_colored.qrc"/>
- <include location="../resources/multimc/multimc.qrc"/>
- <include location="../resources/instances/instances.qrc"/>
- <include location="../resources/OSX/OSX.qrc"/>
- <include location="../resources/iOS/iOS.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/gui/dialogs/AboutDialog.cpp b/gui/dialogs/AboutDialog.cpp
index bacdc2fd..6b31113c 100644
--- a/gui/dialogs/AboutDialog.cpp
+++ b/gui/dialogs/AboutDialog.cpp
@@ -81,7 +81,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
ui->urlLabel->setOpenExternalLinks(true);
- ui->icon->setPixmap(QIcon::fromTheme("multimc").pixmap(64));
+ ui->icon->setPixmap(MMC->getThemedIcon("multimc").pixmap(64));
ui->title->setText("MultiMC 5 " + BuildConfig.printableVersionString());
ui->versionLabel->setText(tr("Version") +": " + BuildConfig.printableVersionString());
diff --git a/gui/pages/InstanceSettingsPage.h b/gui/pages/InstanceSettingsPage.h
index a95e65e4..b43ce610 100644
--- a/gui/pages/InstanceSettingsPage.h
+++ b/gui/pages/InstanceSettingsPage.h
@@ -21,6 +21,7 @@
#include "logic/net/NetJob.h"
#include "logic/java/JavaChecker.h"
#include "BasePage.h"
+#include "MultiMC.h"
class JavaChecker;
namespace Ui
@@ -41,7 +42,7 @@ public:
}
virtual QIcon icon() const override
{
- return QIcon::fromTheme("instance-settings");
+ return MMC->getThemedIcon("instance-settings");
}
virtual QString id() const override
{
diff --git a/gui/pages/LegacyJarModPage.h b/gui/pages/LegacyJarModPage.h
index cda6d2a0..e1ffd5d6 100644
--- a/gui/pages/LegacyJarModPage.h
+++ b/gui/pages/LegacyJarModPage.h
@@ -19,6 +19,7 @@
#include "logic/net/NetJob.h"
#include "BasePage.h"
+#include <MultiMC.h>
class ModList;
class LegacyInstance;
@@ -41,7 +42,7 @@ public:
}
virtual QIcon icon() const
{
- return QIcon::fromTheme("jarmods");
+ return MMC->getThemedIcon("jarmods");
}
virtual QString id() const
{
diff --git a/gui/pages/LegacyUpgradePage.h b/gui/pages/LegacyUpgradePage.h
index 7a53c21a..969b5440 100644
--- a/gui/pages/LegacyUpgradePage.h
+++ b/gui/pages/LegacyUpgradePage.h
@@ -20,6 +20,7 @@
#include "logic/OneSixInstance.h"
#include "logic/net/NetJob.h"
#include "BasePage.h"
+#include <MultiMC.h>
class EnabledItemFilter;
namespace Ui
@@ -40,7 +41,7 @@ public:
}
virtual QIcon icon() const override
{
- return QIcon::fromTheme("checkupdate");
+ return MMC->getThemedIcon("checkupdate");
}
virtual QString id() const override
{
diff --git a/gui/pages/LogPage.h b/gui/pages/LogPage.h
index c566528d..7d073a53 100644
--- a/gui/pages/LogPage.h
+++ b/gui/pages/LogPage.h
@@ -21,6 +21,7 @@
#include "logic/net/NetJob.h"
#include "logic/MinecraftProcess.h"
#include "BasePage.h"
+#include <MultiMC.h>
class EnabledItemFilter;
class MinecraftProcess;
@@ -43,7 +44,7 @@ public:
}
virtual QIcon icon() const override
{
- return QIcon::fromTheme("log");
+ return MMC->getThemedIcon("log");
}
virtual QString id() const override
{
diff --git a/gui/pages/ModFolderPage.h b/gui/pages/ModFolderPage.h
index 09f6adc7..8859ad99 100644
--- a/gui/pages/ModFolderPage.h
+++ b/gui/pages/ModFolderPage.h
@@ -20,6 +20,7 @@
#include "logic/OneSixInstance.h"
#include "logic/net/NetJob.h"
#include "BasePage.h"
+#include <MultiMC.h>
class EnabledItemFilter;
class ModList;
@@ -43,7 +44,7 @@ public:
}
virtual QIcon icon() const override
{
- return QIcon::fromTheme(m_iconName);
+ return MMC->getThemedIcon(m_iconName);
}
virtual QString id() const override
{
diff --git a/gui/pages/NotesPage.h b/gui/pages/NotesPage.h
index bbe9d856..f77ea530 100644
--- a/gui/pages/NotesPage.h
+++ b/gui/pages/NotesPage.h
@@ -20,6 +20,7 @@
#include "logic/BaseInstance.h"
#include "logic/net/NetJob.h"
#include "BasePage.h"
+#include <MultiMC.h>
class EnabledItemFilter;
namespace Ui
@@ -40,9 +41,9 @@ public:
}
virtual QIcon icon() const override
{
- auto icon = QIcon::fromTheme("notes");
+ auto icon = MMC->getThemedIcon("notes");
if(icon.isNull())
- icon = QIcon::fromTheme("news");
+ icon = MMC->getThemedIcon("news");
return icon;
}
virtual QString id() const override
diff --git a/gui/pages/OtherLogsPage.h b/gui/pages/OtherLogsPage.h
index 86844749..5777cb83 100644
--- a/gui/pages/OtherLogsPage.h
+++ b/gui/pages/OtherLogsPage.h
@@ -18,6 +18,7 @@
#include <QWidget>
#include "BasePage.h"
+#include <MultiMC.h>
namespace Ui
{
@@ -46,7 +47,7 @@ public:
}
QIcon icon() const override
{
- return QIcon::fromTheme("log");
+ return MMC->getThemedIcon("log");
}
QString helpPage() const override
{
diff --git a/gui/pages/ScreenshotsPage.cpp b/gui/pages/ScreenshotsPage.cpp
index d47a2897..1771a118 100644
--- a/gui/pages/ScreenshotsPage.cpp
+++ b/gui/pages/ScreenshotsPage.cpp
@@ -16,6 +16,7 @@
#include <QKeyEvent>
#include <pathutils.h>
+#include <MultiMC.h>
#include "gui/dialogs/ProgressDialog.h"
#include "gui/dialogs/CustomMessageBox.h"
@@ -103,7 +104,7 @@ public:
{
m_thumbnailingPool.setMaxThreadCount(4);
m_thumbnailCache = std::make_shared<SharedIconCache>();
- m_thumbnailCache->add("placeholder", QIcon::fromTheme("screenshot-placeholder"));
+ m_thumbnailCache->add("placeholder", MMC->getThemedIcon("screenshot-placeholder"));
connect(&watcher, SIGNAL(fileChanged(QString)), SLOT(fileChanged(QString)));
// FIXME: the watched file set is not updated when files are removed
}
diff --git a/gui/pages/ScreenshotsPage.h b/gui/pages/ScreenshotsPage.h
index ccf3856d..6be2a26d 100644
--- a/gui/pages/ScreenshotsPage.h
+++ b/gui/pages/ScreenshotsPage.h
@@ -19,6 +19,7 @@
#include "logic/OneSixInstance.h"
#include "BasePage.h"
+#include <MultiMC.h>
class QFileSystemModel;
class QIdentityProxyModel;
@@ -53,7 +54,7 @@ public:
}
virtual QIcon icon() const override
{
- return QIcon::fromTheme("screenshots");
+ return MMC->getThemedIcon("screenshots");
}
virtual QString id() const override
{
diff --git a/gui/pages/global/AccountListPage.h b/gui/pages/global/AccountListPage.h
index 87f773d9..9fd894b8 100644
--- a/gui/pages/global/AccountListPage.h
+++ b/gui/pages/global/AccountListPage.h
@@ -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;
}
diff --git a/gui/pages/global/ExternalToolsPage.h b/gui/pages/global/ExternalToolsPage.h
index 79078fa3..7c5efad6 100644
--- a/gui/pages/global/ExternalToolsPage.h
+++ b/gui/pages/global/ExternalToolsPage.h
@@ -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;
}
diff --git a/gui/pages/global/JavaPage.h b/gui/pages/global/JavaPage.h
index 779ca86d..f70d9dbd 100644
--- a/gui/pages/global/JavaPage.h
+++ b/gui/pages/global/JavaPage.h
@@ -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
{
diff --git a/gui/pages/global/MinecraftPage.h b/gui/pages/global/MinecraftPage.h
index a47fd48b..6dd86338 100644
--- a/gui/pages/global/MinecraftPage.h
+++ b/gui/pages/global/MinecraftPage.h
@@ -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
{
diff --git a/gui/pages/global/MultiMCPage.cpp b/gui/pages/global/MultiMCPage.cpp
index cc2b2781..cc923b2f 100644
--- a/gui/pages/global/MultiMCPage.cpp
+++ b/gui/pages/global/MultiMCPage.cpp
@@ -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
diff --git a/gui/pages/global/MultiMCPage.h b/gui/pages/global/MultiMCPage.h
index 1a6ad39a..96e56f47 100644
--- a/gui/pages/global/MultiMCPage.h
+++ b/gui/pages/global/MultiMCPage.h
@@ -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
{
diff --git a/gui/pages/global/ProxyPage.h b/gui/pages/global/ProxyPage.h
index 014548dd..edb7587a 100644
--- a/gui/pages/global/ProxyPage.h
+++ b/gui/pages/global/ProxyPage.h
@@ -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
{
diff --git a/gui/widgets/PageContainer.cpp b/gui/widgets/PageContainer.cpp
index b84594c1..59b800cc 100644
--- a/gui/widgets/PageContainer.cpp
+++ b/gui/widgets/PageContainer.cpp
@@ -32,6 +32,7 @@
#include "gui/widgets/IconLabel.h"
#include "gui/Platform.h"
#include "PageContainer_p.h"
+#include <MultiMC.h>
class PageEntryFilterModel : public QSortFilterProxyModel
{
@@ -174,7 +175,7 @@ void PageContainer::showPage(int row)
{
m_pageStack->setCurrentIndex(0);
m_header->setText(QString());
- m_iconHeader->setIcon(QIcon::fromTheme("bug"));
+ m_iconHeader->setIcon(MMC->getThemedIcon("bug"));
}
}
diff --git a/gui/widgets/ServerStatus.cpp b/gui/widgets/ServerStatus.cpp
index 3b02fd24..93781e1c 100644
--- a/gui/widgets/ServerStatus.cpp
+++ b/gui/widgets/ServerStatus.cpp
@@ -16,9 +16,9 @@ ServerStatus::ServerStatus(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
{
layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
- goodIcon = QIcon::fromTheme("status-good");
- yellowIcon = QIcon::fromTheme("status-yellow");
- badIcon = QIcon::fromTheme("status-bad");
+ goodIcon = MMC->getThemedIcon("status-good");
+ yellowIcon = MMC->getThemedIcon("status-yellow");
+ badIcon = MMC->getThemedIcon("status-bad");
addStatus("minecraft.net", tr("Web"));
addLine();
@@ -33,7 +33,7 @@ ServerStatus::ServerStatus(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
m_statusRefresh = new QToolButton(this);
m_statusRefresh->setCheckable(true);
m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly);
- m_statusRefresh->setIcon(QIcon::fromTheme("refresh"));
+ m_statusRefresh->setIcon(MMC->getThemedIcon("refresh"));
layout->addWidget(m_statusRefresh);
setLayout(layout);