From 2d3fef31131c2d9981265664c1581ca11dc2c2d3 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 30 Oct 2023 18:34:24 +0000 Subject: [PATCH] Fix: Incorrect padding for smallmap legend 'icon'. The size of this icon is based off FONT_HEIGHT_SMALL - 1, so it makes sense to use a scaled 1 here. --- src/smallmap_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 10c93405fc..7ff1c62dfe 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1222,7 +1222,7 @@ void SmallMapWindow::RebuildColourIndexIfNecessary() bool rtl = _current_text_dir == TD_RTL; uint i = 0; // Row counter for industry legend. uint row_height = FONT_HEIGHT_SMALL; - int padding = WidgetDimensions::scaled.hsep_normal; + int padding = ScaleGUITrad(1); Rect origin = r.WithWidth(this->column_width, rtl).Shrink(WidgetDimensions::scaled.framerect).WithHeight(row_height); Rect text = origin.Indent(this->legend_width + WidgetDimensions::scaled.hsep_normal, rtl);