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

LibVT: Use coarse scrolling animation in TerminalWidget

The smooth scrolling looks slightly off in the terminal as the
scrollbar animation lasts longer than the actual scroll.

This behaviour is also consistent with other terminal emulators.
This commit is contained in:
MacDue 2022-03-08 21:51:59 +00:00 committed by Andreas Kling
parent 91fff3f1ae
commit 8fbe96af45

View file

@ -90,6 +90,7 @@ TerminalWidget::TerminalWidget(int ptm_fd, bool automatic_size_policy)
m_auto_scroll_timer = add<Core::Timer>(); m_auto_scroll_timer = add<Core::Timer>();
m_scrollbar = add<GUI::Scrollbar>(Orientation::Vertical); m_scrollbar = add<GUI::Scrollbar>(Orientation::Vertical);
m_scrollbar->set_scroll_animation(GUI::Scrollbar::Animation::CoarseScroll);
m_scrollbar->set_relative_rect(0, 0, 16, 0); m_scrollbar->set_relative_rect(0, 0, 16, 0);
m_scrollbar->on_change = [this](int) { m_scrollbar->on_change = [this](int) {
update(); update();