From 4f9aa70c111266722b08e1034f9f4bc481b3b77f Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 16 Apr 2023 19:42:53 +0100 Subject: [PATCH] Departure boards: Fix vehicle type icon in right-to-left languages --- src/departures_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/departures_gui.cpp b/src/departures_gui.cpp index 052ad790e7..6ff460a112 100644 --- a/src/departures_gui.cpp +++ b/src/departures_gui.cpp @@ -814,7 +814,8 @@ void DeparturesWindow::DrawDeparturesListItems(const Rect &r) const type += offset; - DrawString(text_left + time_width + 3, text_left + time_width + type_width + 3, y, type); + const int icon_left = ltr ? text_left + time_width + ScaleGUITrad(3) : text_right - time_width - ScaleGUITrad(3) - type_width; + DrawString(icon_left, icon_left + type_width, y, type); } /* The icons to show with the destination and via stations. */