2022-03-27 22:32:32 +03:00
|
|
|
/*
|
|
|
|
* 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:
|
2022-12-06 19:26:13 +03:00
|
|
|
ErrorOr<void> set_theme(DeprecatedString path);
|
2022-03-27 22:32:32 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
explicit ThemePreviewWidget(Gfx::Palette const& palette);
|
|
|
|
|
|
|
|
void paint_preview(GUI::PaintEvent& event) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|