Update window scaling #9087
Motivation / Problem
Many windows do not resize properly, either they use hardcoded pixel sizes which do not scale, or they are set up once when opening and not when if the (admittedly rarely) GUI/Font zoom options are changed.
This is a set of patches that... escalated from trying to fix the issue of padding size not being adjusted, and may perhaps need splitting up.
The core functionality is achieved by the parameters to SetPIP/SetPadding/SetMinimalSize/SetMinimalTextLines methods (and therefore from NWidgetParts) is stored within the runtime widget data, allowing it to be reprocessed and adjusted for the current gui/font size setting. This is done rather than reprocessing the NWidgetParts because that would not work for dynamically created widgets.
Because these calls now expect unscaled values, some calls where sprite sizes are used had to be adjusted to get the unzoomed (OUT_4X) sprite size instead.
Additional numerous fixes to layout and padding is also included as separate changes, some of these are independent of this core change, but a few others are dependent on it.
Currently vertical scrollbar width varies depending on which widgets they are arranged with. This should probably be fixed by forcing the largest size for all.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
The text was updated successfully, but these errors were encountered:
Both company icon sprite and text now centred within each row, and extra padding added to avoid the sprites running into each other.