summaryrefslogtreecommitdiff
path: root/Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-03-27 20:32:32 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-02 21:50:41 +0200
commit04b6a060ca134ab809c1ff68901de9f78df217d1 (patch)
treeac088dc5b153b378100c46dac49f503c9a80b7f2 /Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
parent8fa0409ae145b0dcbe784679a43b70ec91de900e (diff)
downloadserenity-04b6a060ca134ab809c1ff68901de9f78df217d1.zip
DisplaySettings: Add theme selection and preview
Diffstat (limited to 'Userland/Applications/DisplaySettings/ThemesSettingsWidget.h')
-rw-r--r--Userland/Applications/DisplaySettings/ThemesSettingsWidget.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/Userland/Applications/DisplaySettings/ThemesSettingsWidget.h b/Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
new file mode 100644
index 0000000000..520a754642
--- /dev/null
+++ b/Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
@@ -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();
+};
+
+}