aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global/LauncherPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/global/LauncherPage.cpp')
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp37
1 files changed, 33 insertions, 4 deletions
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index b8431e8c..822c69b0 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -49,6 +49,7 @@
#include <FileSystem.h>
#include "Application.h"
#include "BuildConfig.h"
+#include "DesktopServices.h"
#include "ui/themes/ITheme.h"
#include <QApplication>
@@ -143,7 +144,7 @@ void LauncherPage::on_instDirBrowseBtn_clicked()
ui->instDirTextBox->setText(cooked_dir);
}
}
- else if(APPLICATION->isFlatpak() && raw_dir.startsWith("/run/user"))
+ else if(DesktopServices::isFlatpak() && raw_dir.startsWith("/run/user"))
{
QMessageBox warning;
warning.setText(tr("You're trying to specify an instance folder "
@@ -310,9 +311,12 @@ void LauncherPage::applySettings()
s->set("IconTheme", "flat");
break;
case 7:
- s->set("IconTheme", "multimc");
+ s->set("IconTheme", "flat_white");
break;
case 8:
+ s->set("IconTheme", "multimc");
+ break;
+ case 9:
s->set("IconTheme", "custom");
break;
}
@@ -330,6 +334,18 @@ void LauncherPage::applySettings()
APPLICATION->setApplicationTheme(newAppTheme, false);
}
+ switch (ui->themeBackgroundCat->currentIndex()) {
+ case 0: // original cat
+ s->set("BackgroundCat", "kitteh");
+ break;
+ case 1: // rory the cat
+ s->set("BackgroundCat", "rory");
+ break;
+ case 2: // rory the cat flat edition
+ s->set("BackgroundCat", "rory-flat");
+ break;
+ }
+
s->set("MenuBarInsteadOfToolBar", ui->preferMenuBarCheckBox->isChecked());
// Console settings
@@ -408,14 +424,27 @@ void LauncherPage::loadSettings()
{
ui->themeComboBox->setCurrentIndex(6);
}
- else if (theme == "multimc")
+ else if (theme == "flat_white")
{
ui->themeComboBox->setCurrentIndex(7);
}
- else if (theme == "custom")
+ else if (theme == "multimc")
{
ui->themeComboBox->setCurrentIndex(8);
}
+ else if (theme == "custom")
+ {
+ ui->themeComboBox->setCurrentIndex(9);
+ }
+
+ auto cat = s->get("BackgroundCat").toString();
+ if (cat == "kitteh") {
+ ui->themeBackgroundCat->setCurrentIndex(0);
+ } else if (cat == "rory") {
+ ui->themeBackgroundCat->setCurrentIndex(1);
+ } else if (cat == "rory-flat") {
+ ui->themeBackgroundCat->setCurrentIndex(2);
+ }
{
auto currentTheme = s->get("ApplicationTheme").toString();