1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 18:09:09 +00:00

Fix: Land info window maximum width was not scaled. (#10894)

This commit is contained in:
2023-05-31 09:54:39 +01:00
committed by GitHub
parent 0302e6f168
commit 1ff0dc11d8

View File

@@ -102,7 +102,7 @@ public:
if (!this->cargo_acceptance.empty()) {
uint width = GetStringBoundingBox(this->cargo_acceptance).width + WidgetDimensions::scaled.frametext.Horizontal();
size->width = std::max(size->width, std::min(300u, width));
size->width = std::max(size->width, std::min(static_cast<uint>(ScaleGUITrad(300)), width));
SetDParamStr(0, cargo_acceptance);
size->height += GetStringHeight(STR_JUST_RAW_STRING, size->width - WidgetDimensions::scaled.frametext.Horizontal());
}