1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

Fix #15039: Name and version can disappear from content list. (#15040)

If the small font is set larger than the normal font, both name and version text disappeared.

Take account of the height of the small font when setting the resize height.
This commit is contained in:
Peter Nelson
2026-01-04 17:54:59 +00:00
committed by GitHub
parent 7935253ee4
commit f0105607dc

View File

@@ -603,7 +603,7 @@ public:
break;
case WID_NCL_MATRIX:
fill.height = resize.height = std::max(this->checkbox_size.height, (uint)GetCharacterHeight(FS_NORMAL)) + padding.height;
fill.height = resize.height = std::max<uint>(std::max<uint>(this->checkbox_size.height, GetCharacterHeight(FS_NORMAL)), GetCharacterHeight(FS_SMALL)) + padding.height;
size.height = 10 * resize.height;
break;
}