summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/AbstractButton.cpp
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2023-02-12 11:13:18 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-13 00:45:09 +0000
commitd32b052f22d3b1ffbf009d5de17572f381cd87fa (patch)
tree1c7d13a32501208d6e1594ac38d51d2b21ce6c11 /Userland/Libraries/LibGUI/AbstractButton.cpp
parent61b49daf0acd3b3511521eb8eb494d5c57610b62 (diff)
downloadserenity-d32b052f22d3b1ffbf009d5de17572f381cd87fa.zip
LibGUI+Userland: Add `_deprecated` suffix to AbstractButton::{set_,}text
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractButton.cpp')
-rw-r--r--Userland/Libraries/LibGUI/AbstractButton.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractButton.cpp b/Userland/Libraries/LibGUI/AbstractButton.cpp
index c66cd8ee01..9eb76abf2d 100644
--- a/Userland/Libraries/LibGUI/AbstractButton.cpp
+++ b/Userland/Libraries/LibGUI/AbstractButton.cpp
@@ -17,7 +17,7 @@ namespace GUI {
AbstractButton::AbstractButton(DeprecatedString text)
{
- set_text(move(text));
+ set_text_deprecated(move(text));
set_focus_policy(GUI::FocusPolicy::StrongFocus);
set_background_role(Gfx::ColorRole::Button);
@@ -28,13 +28,13 @@ AbstractButton::AbstractButton(DeprecatedString text)
click();
};
- REGISTER_STRING_PROPERTY("text", text, set_text);
+ REGISTER_STRING_PROPERTY("text", text_deprecated, set_text_deprecated);
REGISTER_BOOL_PROPERTY("checked", is_checked, set_checked);
REGISTER_BOOL_PROPERTY("checkable", is_checkable, set_checkable);
REGISTER_BOOL_PROPERTY("exclusive", is_exclusive, set_exclusive);
}
-void AbstractButton::set_text(DeprecatedString text)
+void AbstractButton::set_text_deprecated(DeprecatedString text)
{
if (m_text == text)
return;
@@ -238,14 +238,14 @@ void AbstractButton::paint_text(Painter& painter, Gfx::IntRect const& rect, Gfx:
auto clipped_rect = rect.intersected(this->rect());
if (!is_enabled()) {
- painter.draw_text(clipped_rect.translated(1, 1), text(), font, text_alignment, palette().disabled_text_back(), Gfx::TextElision::Right, text_wrapping);
- painter.draw_text(clipped_rect, text(), font, text_alignment, palette().disabled_text_front(), Gfx::TextElision::Right, text_wrapping);
+ painter.draw_text(clipped_rect.translated(1, 1), text_deprecated(), font, text_alignment, palette().disabled_text_back(), Gfx::TextElision::Right, text_wrapping);
+ painter.draw_text(clipped_rect, text_deprecated(), font, text_alignment, palette().disabled_text_front(), Gfx::TextElision::Right, text_wrapping);
return;
}
- if (text().is_empty())
+ if (text_deprecated().is_empty())
return;
- painter.draw_text(clipped_rect, text(), font, text_alignment, palette().color(foreground_role()), Gfx::TextElision::Right, text_wrapping);
+ painter.draw_text(clipped_rect, text_deprecated(), font, text_alignment, palette().color(foreground_role()), Gfx::TextElision::Right, text_wrapping);
}
void AbstractButton::change_event(Event& event)