From 3eba97f67cc14ef55c3291c7758e4bf57db36a9b Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 2 May 2025 22:21:05 +0100 Subject: [PATCH] Codechange: Scrollbar Count no longer needs to be clamped to uint16_t. (#14184) --- src/textfile_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index fdd3d4cd3e..4b76254054 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -152,11 +152,11 @@ void TextfileWindow::SetupScrollbars(bool force_reflow) if (IsWidgetLowered(WID_TF_WRAPTEXT)) { /* Reflow is mandatory if text wrapping is on */ uint height = this->ReflowContent(); - this->vscroll->SetCount(ClampTo(height)); + this->vscroll->SetCount(height); this->hscroll->SetCount(0); } else { uint height = force_reflow ? this->ReflowContent() : this->GetContentHeight(); - this->vscroll->SetCount(ClampTo(height)); + this->vscroll->SetCount(height); this->hscroll->SetCount(this->max_length); }