1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibGUI+HackStudio+PixelPaint: Port Widget title to the new String

I had to add a set_title(String) helper function for ImageEditor because
TabWidget requires it. This is a temporary fix and will be handled in
subsequent commit.
This commit is contained in:
Karol Kosek 2023-03-10 18:40:34 +01:00 committed by Andreas Kling
parent 858e55b653
commit 3805e4e3a9
7 changed files with 15 additions and 13 deletions

View file

@ -76,7 +76,7 @@ Widget::Widget()
REGISTER_INT_PROPERTY("font_size", m_font->presentation_size, set_font_size);
REGISTER_FONT_WEIGHT_PROPERTY("font_weight", m_font->weight, set_font_weight);
REGISTER_DEPRECATED_STRING_PROPERTY("title", title, set_title);
REGISTER_STRING_PROPERTY("title", title, set_title);
register_property(
"font_type", [this] { return m_font->is_fixed_width() ? "FixedWidth" : "Normal"; },
@ -1048,7 +1048,7 @@ void Widget::set_palette(Palette& palette)
update();
}
void Widget::set_title(DeprecatedString title)
void Widget::set_title(String title)
{
m_title = move(title);
layout_relevant_change_occurred();
@ -1057,7 +1057,7 @@ void Widget::set_title(DeprecatedString title)
parent_widget()->update();
}
DeprecatedString Widget::title() const
String Widget::title() const
{
return m_title;
}