mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Codechange: Scrollbar Count no longer needs to be clamped to uint16_t. (#14184)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user