TermControl: set the scrollbar jump distance to one screenful (#7385)

Most applications with scrollable content seem to define the "large
jump" distance as about a screenful of content. You can see this in long
pages in Settings and documents in Notepad.

We just weren't configuring ScrollBar here.

Fixes #7367
This commit is contained in:
Dustin L. Howett 2020-08-24 15:54:02 -07:00 committed by GitHub
parent 17e0c11840
commit a5bed25417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,6 +156,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
scrollBar.Maximum(update.newMaximum);
scrollBar.Minimum(update.newMinimum);
scrollBar.ViewportSize(update.newViewportSize);
scrollBar.LargeChange(std::max(update.newViewportSize - 1, 0.)); // scroll one "screenful" at a time when the scroll bar is clicked
control->_isInternalScrollBarUpdate = false;
}
@ -699,6 +700,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
ScrollBar().Minimum(0);
ScrollBar().Value(0);
ScrollBar().ViewportSize(bufferHeight);
ScrollBar().LargeChange(std::max<SHORT>(bufferHeight - 1, 0)); // scroll one "screenful" at a time when the scroll bar is clicked
localPointerToThread->EnablePainting();