aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-11-05 11:16:41 +0100
committerGitHub <noreply@github.com>2022-11-05 11:16:41 +0100
commite4bd82190aff5c3293e21808a64bd81956f17b16 (patch)
tree19fc0bbc9bbf31e6d47a1fa574657b9db94d7521 /launcher/ui/pages/global
parent695734636f9c8668d447edce24dc1b0e3dd00214 (diff)
parentc2f37716e59055636bee2d1549a16809c408e45b (diff)
downloadPrismLauncher-e4bd82190aff5c3293e21808a64bd81956f17b16.tar.gz
PrismLauncher-e4bd82190aff5c3293e21808a64bd81956f17b16.tar.bz2
PrismLauncher-e4bd82190aff5c3293e21808a64bd81956f17b16.zip
Merge pull request #149 from TayouVR/better-custom-themes
Diffstat (limited to 'launcher/ui/pages/global')
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp45
1 files changed, 4 insertions, 41 deletions
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 822c69b0..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
@@ -396,46 +397,8 @@ 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") {