From b79360862df225ee67f92f0614cd48d07fa04ac8 Mon Sep 17 00:00:00 2001 From: PeterN Date: Mon, 28 Nov 2022 20:03:27 +0000 Subject: [PATCH] Fix eb4ba1991: Signal icons incorrectly positioned in UI. (#10199) (cherry picked from commit 387c57b02348612a623542f5079deafd493bdd7f) --- src/rail_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index d901f6cb4e..69362d2f22 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1826,7 +1826,7 @@ private: { Point offset; Dimension sprite_size = GetSpriteSize(image.sprite, &offset); - int x = CenterBounds(r.left, r.right, sprite_size.width - offset.x); + int x = CenterBounds(r.left, r.right, sprite_size.width - offset.x) - offset.x; // centered int y = r.top - sig_sprite_bottom_offset + WD_IMGBTN_TOP + (r.bottom - r.top - WD_IMGBTN_TOP - WD_IMGBTN_BOTTOM + sig_sprite_size.height) / 2; // aligned to bottom