1
0
Fork 0

Codechange: Scrollbar Count no longer needs to be clamped to uint16_t.

pull/14184/head
Peter Nelson 2025-05-01 22:14:43 +01:00
parent d958d50985
commit ea66bb39f7
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 2 additions and 2 deletions

View File

@ -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<uint16_t>(height));
this->vscroll->SetCount(height);
this->hscroll->SetCount(0);
} else {
uint height = force_reflow ? this->ReflowContent() : this->GetContentHeight();
this->vscroll->SetCount(ClampTo<uint16_t>(height));
this->vscroll->SetCount(height);
this->hscroll->SetCount(this->max_length);
}