1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +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,29 @@
/*
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/AbstractThemePreview.h>
#include <LibGUI/Widget.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Palette.h>
#include <LibGfx/WindowTheme.h>
namespace DisplaySettings {
class ThemePreviewWidget final : public GUI::AbstractThemePreview {
C_OBJECT(ThemePreviewWidget);
public:
void set_theme(String path);
private:
explicit ThemePreviewWidget(Gfx::Palette const& palette);
void paint_preview(GUI::PaintEvent& event) override;
};
}