mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
LibGUI+Userland: Port Labels to String
This commit is contained in:
parent
3d53dc8228
commit
91bafc2653
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/thankyouverycool
Commit: 91bafc2653
Pull-request: https://github.com/SerenityOS/serenity/pull/18573
92 changed files with 240 additions and 242 deletions
|
@ -81,10 +81,10 @@ NotificationWindow::NotificationWindow(i32 client_id, DeprecatedString const& te
|
|||
auto& left_container = widget->add<GUI::Widget>();
|
||||
left_container.set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
m_title_label = &left_container.add<GUI::Label>(title);
|
||||
m_title_label = &left_container.add<GUI::Label>(String::from_deprecated_string(title).release_value_but_fixme_should_propagate_errors());
|
||||
m_title_label->set_font(Gfx::FontDatabase::default_font().bold_variant());
|
||||
m_title_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
m_text_label = &left_container.add<GUI::Label>(text);
|
||||
m_text_label = &left_container.add<GUI::Label>(String::from_deprecated_string(text).release_value_but_fixme_should_propagate_errors());
|
||||
m_text_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
|
||||
// FIXME: There used to be code for setting the tooltip here, but since we
|
||||
|
@ -131,14 +131,14 @@ void NotificationWindow::leave_event(Core::Event&)
|
|||
|
||||
void NotificationWindow::set_text(DeprecatedString const& value)
|
||||
{
|
||||
m_text_label->set_text(value);
|
||||
m_text_label->set_text(String::from_deprecated_string(value).release_value_but_fixme_should_propagate_errors());
|
||||
if (m_hovering)
|
||||
resize_to_fit_text();
|
||||
}
|
||||
|
||||
void NotificationWindow::set_title(DeprecatedString const& value)
|
||||
{
|
||||
m_title_label->set_text(value);
|
||||
m_title_label->set_text(String::from_deprecated_string(value).release_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
|
||||
void NotificationWindow::set_image(Gfx::ShareableBitmap const& image)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue