/* * Copyright (c) 2022, MacDue * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace MouseSettings { class HighlightPreviewWidget final : public GUI::AbstractThemePreview { C_OBJECT(HighlightPreviewWidget) public: virtual ~HighlightPreviewWidget() override = default; virtual void paint_preview(GUI::PaintEvent&) override; void set_radius(int radius) { m_radius = radius; update(); } void set_color(Gfx::Color color) { m_color = color; update(); } private: explicit HighlightPreviewWidget(Gfx::Palette const& palette); ErrorOr reload_cursor(); RefPtr m_cursor_bitmap; Gfx::CursorParams m_cursor_params; RefPtr m_frame_timer; int m_cursor_frame { 0 }; int m_radius { 0 }; Gfx::Color m_color; }; }