1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 04:04:59 +00:00

FontEditor: Add text box for editing the font name.

This commit is contained in:
Andreas Kling 2019-02-03 03:06:58 +01:00
parent 5877feab1b
commit 663aad4036
5 changed files with 21 additions and 1 deletions

View file

@ -68,6 +68,8 @@ void GTextBox::handle_backspace()
if (m_text.length() == 1) {
m_text = String::empty();
m_cursor_position = 0;
if (on_change)
on_change(*this);
update();
return;
}
@ -80,6 +82,8 @@ void GTextBox::handle_backspace()
m_text = move(new_text);
--m_cursor_position;
if (on_change)
on_change(*this);
update();
}
@ -118,6 +122,8 @@ void GTextBox::keydown_event(GKeyEvent& event)
m_text = move(new_text);
++m_cursor_position;
if (on_change)
on_change(*this);
update();
return;
}