aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/global')
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp64
-rw-r--r--launcher/ui/pages/global/LauncherPage.ui38
2 files changed, 62 insertions, 40 deletions
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 4ae7509c..6661bf0f 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (c) 2022 dada513 <dada513@protonmail.com>
+ * Copyright (C) 2022 Tayou <tayou@gmx.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -334,6 +335,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
@@ -384,45 +397,16 @@ void LauncherPage::loadSettings()
m_currentUpdateChannel = s->get("UpdateChannel").toString();
//FIXME: make generic
auto theme = s->get("IconTheme").toString();
- if (theme == "pe_colored")
- {
- ui->themeComboBox->setCurrentIndex(0);
- }
- else if (theme == "pe_light")
- {
- ui->themeComboBox->setCurrentIndex(1);
- }
- else if (theme == "pe_dark")
- {
- ui->themeComboBox->setCurrentIndex(2);
- }
- else if (theme == "pe_blue")
- {
- ui->themeComboBox->setCurrentIndex(3);
- }
- else if (theme == "OSX")
- {
- ui->themeComboBox->setCurrentIndex(4);
- }
- else if (theme == "iOS")
- {
- ui->themeComboBox->setCurrentIndex(5);
- }
- else if (theme == "flat")
- {
- ui->themeComboBox->setCurrentIndex(6);
- }
- else if (theme == "flat_white")
- {
- ui->themeComboBox->setCurrentIndex(7);
- }
- else if (theme == "multimc")
- {
- ui->themeComboBox->setCurrentIndex(8);
- }
- else if (theme == "custom")
- {
- ui->themeComboBox->setCurrentIndex(9);
+ QStringList iconThemeOptions{"pe_colored", "pe_light", "pe_dark", "pe_blue", "OSX", "iOS", "flat", "flat_white", "multimc", "custom"};
+ ui->themeComboBox->setCurrentIndex(iconThemeOptions.indexOf(theme));
+
+ 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);
}
{
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 76a25f2e..6de644ee 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -340,6 +340,44 @@
</property>
</widget>
</item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>C&amp;at</string>
+ </property>
+ <property name="buddy">
+ <cstring>themeBackgroundCat</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="themeBackgroundCat">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <item>
+ <property name="text">
+ <string>Background Cat (from MultiMC)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Rory ID 11 (drawn by Ashtaka)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Rory ID 11 (flat edition, drawn by Ashtaka)</string>
+ </property>
+ </item>
+ </widget>
+ </item>
</layout>
</widget>
</item>