1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:55:09 +00:00

LibGUI: Add a way for GWidget subclasses to learn that the font changed

Use this in GTextEditor to update the vertical scrolling step size so
we always scroll one-line-at-a-time.
This commit is contained in:
Andreas Kling 2019-09-01 12:26:35 +02:00
parent e7d15ccca4
commit 3e2e086011
4 changed files with 22 additions and 6 deletions

View file

@ -1448,3 +1448,9 @@ void GTextEditor::add_custom_context_menu_action(GAction& action)
{
m_custom_context_menu_actions.append(action);
}
void GTextEditor::did_change_font()
{
vertical_scrollbar().set_step(line_height());
GWidget::did_change_font();
}