浏览代码

GTextEditor: Set the vertical scrollbar step size to the line height.

This makes us scroll one line at a time.
Andreas Kling 6 年之前
父节点
当前提交
0ece5fee14
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      LibGUI/GTextEditor.cpp

+ 2 - 0
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<Line>());
     m_cursor = { 0, 0 };
     create_actions();