summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Label.h
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2023-04-29 10:41:48 -0400
committerAndreas Kling <kling@serenityos.org>2023-04-30 05:48:14 +0200
commit91bafc2653bcbcc0b8d05b5589324375b92f91b5 (patch)
tree3ebc611c104c9c1c47c4b85b594e36f91c66c026 /Userland/Libraries/LibGUI/Label.h
parent3d53dc82283e7eccf7a27918dbbcd391dc4988f7 (diff)
downloadserenity-91bafc2653bcbcc0b8d05b5589324375b92f91b5.zip
LibGUI+Userland: Port Labels to String
Diffstat (limited to 'Userland/Libraries/LibGUI/Label.h')
-rw-r--r--Userland/Libraries/LibGUI/Label.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGUI/Label.h b/Userland/Libraries/LibGUI/Label.h
index 65f52dc381..e6499180c6 100644
--- a/Userland/Libraries/LibGUI/Label.h
+++ b/Userland/Libraries/LibGUI/Label.h
@@ -19,11 +19,11 @@ class Label : public Frame {
public:
virtual ~Label() override = default;
- DeprecatedString text() const { return m_text; }
- void set_text(DeprecatedString);
+ String const& text() const { return m_text; }
+ void set_text(String);
void set_icon(Gfx::Bitmap const*);
- void set_icon_from_path(DeprecatedString const&);
+ void set_icon_from_path(StringView);
Gfx::Bitmap const* icon() const { return m_icon.ptr(); }
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
@@ -46,7 +46,7 @@ public:
Gfx::IntRect text_rect() const;
protected:
- explicit Label(DeprecatedString text = {});
+ explicit Label(String text = {});
virtual void paint_event(PaintEvent&) override;
virtual void did_change_font() override;
@@ -55,7 +55,7 @@ protected:
private:
void size_to_fit();
- DeprecatedString m_text;
+ String m_text;
RefPtr<Gfx::Bitmap const> m_icon;
Gfx::TextAlignment m_text_alignment { Gfx::TextAlignment::Center };
Gfx::TextWrapping m_text_wrapping { Gfx::TextWrapping::Wrap };