1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 06:05:07 +00:00
serenity/Userland/Applications/DisplaySettings/ThemesSettingsWidget.h
MacDue 0c74f30819 DisplaySettings: Link to cursor themes from "Themes" tab
This removes a few clicks to access the mouse settings and puts
all theming actions in one place.
2022-05-25 23:14:22 +01:00

40 lines
888 B
C++

/*
* 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 };
RefPtr<GUI::Button> m_cursor_themes_button;
bool& m_background_settings_changed;
ThemesSettingsWidget(bool& background_settings_changed);
};
}