2023-01-09 16:01:33 +00:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
/*
|
|
|
|
* Prism Launcher - Minecraft Launcher
|
2023-06-28 22:02:34 +01:00
|
|
|
* Copyright (C) 2022 Tayou <git@tayou.org>
|
2023-01-09 16:01:33 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* the Free Software Foundation, version 3.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include "translations/TranslationsModel.h"
|
|
|
|
|
|
|
|
enum ThemeFields { NONE = 0b0000, ICONS = 0b0001, WIDGETS = 0b0010, CAT = 0b0100 };
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ThemeCustomizationWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ThemeCustomizationWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ThemeCustomizationWidget(QWidget* parent = nullptr);
|
2023-07-18 22:50:43 +01:00
|
|
|
~ThemeCustomizationWidget() override;
|
2023-01-09 16:01:33 +00:00
|
|
|
|
|
|
|
void showFeatures(ThemeFields features);
|
|
|
|
|
|
|
|
void applySettings();
|
|
|
|
|
|
|
|
void loadSettings();
|
|
|
|
void retranslate();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void applyIconTheme(int index);
|
|
|
|
void applyWidgetTheme(int index);
|
|
|
|
void applyCatTheme(int index);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
int currentIconThemeChanged(int index);
|
|
|
|
int currentWidgetThemeChanged(int index);
|
|
|
|
int currentCatChanged(int index);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::ThemeCustomizationWidget* ui;
|
|
|
|
|
2023-07-18 22:50:43 +01:00
|
|
|
QList<std::pair<QString, QString>> m_catOptions{
|
2023-01-09 16:01:33 +00:00
|
|
|
{ "kitteh", QObject::tr("Background Cat (from MultiMC)") },
|
|
|
|
{ "rory", QObject::tr("Rory ID 11 (drawn by Ashtaka)") },
|
|
|
|
{ "rory-flat", QObject::tr("Rory ID 11 (flat edition, drawn by Ashtaka)") },
|
|
|
|
{ "teawie", QObject::tr("Teawie (drawn by SympathyTea)") }
|
|
|
|
};
|
2023-01-09 17:40:58 +00:00
|
|
|
};
|