summaryrefslogtreecommitdiff
path: root/Services/WindowServer/Button.h
diff options
context:
space:
mode:
Diffstat (limited to 'Services/WindowServer/Button.h')
-rw-r--r--Services/WindowServer/Button.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/Services/WindowServer/Button.h b/Services/WindowServer/Button.h
index 0002e92f88..7a2d6b82e9 100644
--- a/Services/WindowServer/Button.h
+++ b/Services/WindowServer/Button.h
@@ -27,10 +27,9 @@
#pragma once
#include <AK/Function.h>
-#include <AK/NonnullRefPtr.h>
#include <AK/Weakable.h>
-#include <LibGfx/Rect.h>
#include <LibGfx/Forward.h>
+#include <LibGfx/Rect.h>
namespace WindowServer {
@@ -39,7 +38,7 @@ class WindowFrame;
class Button : public Weakable<Button> {
public:
- Button(WindowFrame&, NonnullRefPtr<Gfx::CharacterBitmap>&&, Function<void(Button&)>&& on_click_handler);
+ Button(WindowFrame&, Function<void(Button&)>&& on_click_handler);
~Button();
Gfx::IntRect relative_rect() const { return m_relative_rect; }
@@ -56,12 +55,12 @@ public:
bool is_visible() const { return m_visible; }
- void set_bitmap(const Gfx::CharacterBitmap& bitmap) { m_bitmap = bitmap; }
+ void set_icon(const Gfx::Bitmap& icon) { m_icon = icon; }
private:
WindowFrame& m_frame;
Gfx::IntRect m_relative_rect;
- NonnullRefPtr<Gfx::CharacterBitmap> m_bitmap;
+ RefPtr<Gfx::Bitmap> m_icon;
bool m_pressed { false };
bool m_visible { true };
bool m_hovered { false };