Use same UI for appearance page and wizard
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
61
launcher/ui/widgets/AppearanceWidget.h
Normal file
61
launcher/ui/widgets/AppearanceWidget.h
Normal file
@@ -0,0 +1,61 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
/*
|
||||
* Prism Launcher - Minecraft Launcher
|
||||
* Copyright (C) 2025 TheKodeToad <TheKodeToad@proton.me>
|
||||
* Copyright (C) 2022 Tayou <git@tayou.org>
|
||||
*
|
||||
* 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 <QDialog>
|
||||
#include <memory>
|
||||
|
||||
#include <Application.h>
|
||||
#include <translations/TranslationsModel.h>
|
||||
#include "java/JavaChecker.h"
|
||||
#include "ui/pages/BasePage.h"
|
||||
|
||||
class QTextCharFormat;
|
||||
class SettingsObject;
|
||||
|
||||
namespace Ui {
|
||||
class AppearanceWidget;
|
||||
}
|
||||
|
||||
class AppearanceWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AppearanceWidget(bool simple, QWidget* parent = 0);
|
||||
virtual ~AppearanceWidget();
|
||||
|
||||
public:
|
||||
void applySettings();
|
||||
void loadSettings();
|
||||
void retranslateUi();
|
||||
|
||||
private:
|
||||
void applyIconTheme(int index);
|
||||
void applyWidgetTheme(int index);
|
||||
void applyCatTheme(int index);
|
||||
void loadThemeSettings();
|
||||
|
||||
void updateConsolePreview();
|
||||
void updateCatPreview();
|
||||
|
||||
Ui::AppearanceWidget* m_ui;
|
||||
QTextCharFormat* m_defaultFormat;
|
||||
bool m_themesOnly;
|
||||
};
|
||||
Reference in New Issue
Block a user