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:
parent
8fa0409ae1
commit
04b6a060ca
7 changed files with 208 additions and 0 deletions
37
Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
Normal file
37
Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
Normal 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();
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue