forked from mirror/OpenTTD
Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
This commit is contained in:
@@ -3412,7 +3412,7 @@ void HideVitalWindows()
|
||||
}
|
||||
|
||||
/** Re-initialize all windows. */
|
||||
void ReInitAllWindows()
|
||||
void ReInitAllWindows(bool zoom_changed)
|
||||
{
|
||||
NWidgetLeaf::InvalidateDimensionCache(); // Reset cached sizes of several widgets.
|
||||
NWidgetScrollbar::InvalidateDimensionCache();
|
||||
@@ -3421,6 +3421,7 @@ void ReInitAllWindows()
|
||||
InitDepotWindowBlockSizes();
|
||||
|
||||
for (Window *w : Window::IterateFromBack()) {
|
||||
if (zoom_changed) w->nested_root->AdjustPaddingForZoom();
|
||||
w->ReInit();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user