mirror of https://github.com/OpenTTD/OpenTTD
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.pull/11411/head
parent
a8aba06a07
commit
2d3fef3113
|
@ -1222,7 +1222,7 @@ void SmallMapWindow::RebuildColourIndexIfNecessary()
|
||||||
bool rtl = _current_text_dir == TD_RTL;
|
bool rtl = _current_text_dir == TD_RTL;
|
||||||
uint i = 0; // Row counter for industry legend.
|
uint i = 0; // Row counter for industry legend.
|
||||||
uint row_height = FONT_HEIGHT_SMALL;
|
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 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);
|
Rect text = origin.Indent(this->legend_width + WidgetDimensions::scaled.hsep_normal, rtl);
|
||||||
|
|
Loading…
Reference in New Issue