1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +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:
Peter Nelson
2024-06-22 16:42:13 +01:00
committed by GitHub
parent e0bcb54a4b
commit 91fd082e93
9 changed files with 19 additions and 19 deletions

View File

@@ -1192,7 +1192,7 @@ struct ScriptDebugWindow : public Window {
void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_SCRD_LOG_PANEL, WidgetDimensions::scaled.framerect.Vertical());
this->hscroll->SetCapacityFromWidget(this, WID_SCRD_LOG_PANEL);
this->hscroll->SetCapacityFromWidget(this, WID_SCRD_LOG_PANEL, WidgetDimensions::scaled.framerect.Horizontal());
}
/**