1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

DisplaySettings: Add theme selection and preview

This commit is contained in:
MacDue 2022-03-27 20:32:32 +01:00 committed by Andreas Kling
parent 8fa0409ae1
commit 04b6a060ca
7 changed files with 208 additions and 0 deletions

View file

@ -0,0 +1,37 @@
/*
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibGUI/ComboBox.h>
#include <LibGUI/SettingsWindow.h>
#include <LibGfx/SystemTheme.h>
#include "ThemePreviewWidget.h"
namespace DisplaySettings {
class ThemesSettingsWidget final : public GUI::SettingsWindow::Tab {
C_OBJECT(ThemesSettingsWidget);
public:
virtual void apply_settings() override;
private:
Vector<Gfx::SystemThemeMetaData> m_themes;
Vector<String> m_theme_names;
RefPtr<GUI::ComboBox> m_themes_combo;
RefPtr<ThemePreviewWidget> m_theme_preview;
Gfx::SystemThemeMetaData const* m_selected_theme { nullptr };
ThemesSettingsWidget();
};
}