mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 18:32:35 +01:00
Fix: Apply widget's internal padding to scrollbar capacity/position. (#12801)
For non-WWT_MATRIX widgets, scrollbars need to take account of the internal padding used for the widget. This is not normally noticeable as framerect padding is only 2 extra pixels
This commit is contained in:
@@ -587,7 +587,7 @@ void TextfileWindow::AfterLoadMarkdown()
|
||||
/* virtual */ void TextfileWindow::OnResize()
|
||||
{
|
||||
this->vscroll->SetCapacityFromWidget(this, WID_TF_BACKGROUND, WidgetDimensions::scaled.frametext.Vertical());
|
||||
this->hscroll->SetCapacityFromWidget(this, WID_TF_BACKGROUND);
|
||||
this->hscroll->SetCapacityFromWidget(this, WID_TF_BACKGROUND, WidgetDimensions::scaled.framerect.Horizontal());
|
||||
|
||||
this->SetupScrollbars(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user