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:
parent
17e0c11840
commit
a5bed25417
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue