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

LibVT: Auto-scroll the terminal

TerminalWidget will now automatically scroll up or down when the user
drags the mouse out of its bounds while selecting text. This happens
at a fixed speed.
This commit is contained in:
Julian Offenhäuser 2020-12-03 22:18:28 +01:00 committed by Andreas Kling
parent 1fab67ea52
commit 6a83475ec5
2 changed files with 30 additions and 0 deletions

View file

@ -175,8 +175,17 @@ private:
int m_glyph_width { 0 };
enum class AutoScrollDirection {
None,
Up,
Down
};
AutoScrollDirection m_auto_scroll_direction { AutoScrollDirection::None };
RefPtr<Core::Timer> m_cursor_blink_timer;
RefPtr<Core::Timer> m_visual_beep_timer;
RefPtr<Core::Timer> m_auto_scroll_timer;
RefPtr<Core::ConfigFile> m_config;
RefPtr<GUI::ScrollBar> m_scrollbar;