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