mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 20:24:12 +01:00
Fix: when syncing width of GUI items, take padding into account (#10915)
This commit is contained in:
committed by
Patric Stout
parent
4949bd8cd5
commit
dea0f7e894
@@ -1440,7 +1440,7 @@ struct GenerateProgressWindow : public Window {
|
||||
|
||||
case WID_GP_PROGRESS_TEXT:
|
||||
for (uint i = 0; i < GWP_CLASS_COUNT; i++) {
|
||||
size->width = std::max(size->width, GetStringBoundingBox(_generation_class_table[i]).width);
|
||||
size->width = std::max(size->width, GetStringBoundingBox(_generation_class_table[i]).width + padding.width);
|
||||
}
|
||||
size->height = FONT_HEIGHT_NORMAL * 2 + WidgetDimensions::scaled.vsep_normal;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user