mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
LibGfx: Convert Font APIs to return String instead of DeprecatedString
This commit is contained in:
parent
4e9dc127ae
commit
545d8336b8
29 changed files with 106 additions and 104 deletions
|
@ -532,13 +532,13 @@ ErrorOr<void> MainWidget::create_widgets()
|
|||
|
||||
m_name_textbox = find_descendant_of_type_named<GUI::TextBox>("name_textbox");
|
||||
m_name_textbox->on_change = [this] {
|
||||
m_font->set_name(m_name_textbox->text());
|
||||
m_font->set_name(MUST(String::from_deprecated_string(m_name_textbox->text())));
|
||||
did_modify_font();
|
||||
};
|
||||
|
||||
m_family_textbox = find_descendant_of_type_named<GUI::TextBox>("family_textbox");
|
||||
m_family_textbox->on_change = [this] {
|
||||
m_font->set_family(m_family_textbox->text());
|
||||
m_font->set_family(MUST(String::from_deprecated_string(m_family_textbox->text())));
|
||||
did_modify_font();
|
||||
};
|
||||
|
||||
|
|
|
@ -218,8 +218,8 @@ NewFontDialog::NewFontDialog(GUI::Window* parent_window)
|
|||
|
||||
void NewFontDialog::save_metadata()
|
||||
{
|
||||
m_new_font_metadata.name = m_name_textbox->text();
|
||||
m_new_font_metadata.family = m_family_textbox->text();
|
||||
m_new_font_metadata.name = MUST(String::from_deprecated_string(m_name_textbox->text()));
|
||||
m_new_font_metadata.family = MUST(String::from_deprecated_string(m_family_textbox->text()));
|
||||
m_new_font_metadata.weight = Gfx::name_to_weight(m_weight_combobox->text());
|
||||
m_new_font_metadata.slope = Gfx::name_to_slope(m_slope_combobox->text());
|
||||
m_new_font_metadata.presentation_size = m_presentation_spinbox->value();
|
||||
|
|
|
@ -35,8 +35,8 @@ private:
|
|||
u8 presentation_size;
|
||||
u16 weight;
|
||||
u8 slope;
|
||||
DeprecatedString name;
|
||||
DeprecatedString family;
|
||||
String name;
|
||||
String family;
|
||||
bool is_fixed_width;
|
||||
} m_new_font_metadata;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue