summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Button.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-02-20 19:03:44 +0100
committerAndreas Kling <kling@serenityos.org>2023-02-21 00:54:04 +0100
commitfaa1a09042d61724417e78db8283b73f3393f77f (patch)
treed9bb9b392f58a37ecb825a89374df2113409191e /Userland/Libraries/LibGUI/Button.h
parentbfe081caadceaabf9104fbc464d15d705752a78f (diff)
downloadserenity-faa1a09042d61724417e78db8283b73f3393f77f.zip
LibGUI: Fix const-correctness issues
Diffstat (limited to 'Userland/Libraries/LibGUI/Button.h')
-rw-r--r--Userland/Libraries/LibGUI/Button.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGUI/Button.h b/Userland/Libraries/LibGUI/Button.h
index b91f92ad97..6936517963 100644
--- a/Userland/Libraries/LibGUI/Button.h
+++ b/Userland/Libraries/LibGUI/Button.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -28,10 +28,9 @@ public:
virtual ~Button() override;
- void set_icon(RefPtr<Gfx::Bitmap>);
+ void set_icon(RefPtr<Gfx::Bitmap const>);
void set_icon_from_path(DeprecatedString const&);
Gfx::Bitmap const* icon() const { return m_icon.ptr(); }
- Gfx::Bitmap* icon() { return m_icon.ptr(); }
void set_text_alignment(Gfx::TextAlignment text_alignment) { m_text_alignment = text_alignment; }
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
@@ -78,7 +77,7 @@ protected:
private:
virtual void timer_event(Core::TimerEvent&) override;
- RefPtr<Gfx::Bitmap> m_icon;
+ RefPtr<Gfx::Bitmap const> m_icon;
RefPtr<GUI::Menu> m_menu;
Gfx::ButtonStyle m_button_style { Gfx::ButtonStyle::Normal };
Gfx::TextAlignment m_text_alignment { Gfx::TextAlignment::Center };