From 0ece5fee14dfba1e55ac6c01cedfc8fc167ba879 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 7 Jun 2019 10:42:43 +0200 Subject: [PATCH] GTextEditor: Set the vertical scrollbar step size to the line height. This makes us scroll one line at a time. --- LibGUI/GTextEditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LibGUI/GTextEditor.cpp b/LibGUI/GTextEditor.cpp index 001e99d497..d06d3e7d40 100644 --- a/LibGUI/GTextEditor.cpp +++ b/LibGUI/GTextEditor.cpp @@ -22,6 +22,8 @@ GTextEditor::GTextEditor(Type type, GWidget* parent) set_frame_thickness(2); set_scrollbars_enabled(is_multi_line()); set_font(GFontDatabase::the().get_by_name("Csilla Thin")); + // FIXME: Recompute vertical scrollbar step size on font change. + vertical_scrollbar().set_step(line_height()); m_lines.append(make()); m_cursor = { 0, 0 }; create_actions();