From d5c651dc0be67cc13f89c79476c8381b2f96cd44 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 13 May 2023 12:24:31 +0100 Subject: [PATCH] Fix width of left panel in slots window when using UI scaling See: #515 --- src/tracerestrict_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracerestrict_gui.cpp b/src/tracerestrict_gui.cpp index 5274f89415..b45e2aa123 100644 --- a/src/tracerestrict_gui.cpp +++ b/src/tracerestrict_gui.cpp @@ -3652,7 +3652,7 @@ private: uint ComputeSlotInfoSize() { this->column_size[VGC_NAME] = GetStringBoundingBox(STR_GROUP_ALL_TRAINS); - this->column_size[VGC_NAME].width = std::max(170u, this->column_size[VGC_NAME].width); + this->column_size[VGC_NAME].width = std::max((170u * FONT_HEIGHT_NORMAL) / 10u, this->column_size[VGC_NAME].width); this->tiny_step_height = this->column_size[VGC_NAME].height; SetDParamMaxValue(0, 9999, 3, FS_SMALL);