Changeset - r26620:5eccdefc26ba
[Not reviewed]
master
0 1 0
PeterN - 22 months ago 2022-11-28 20:03:27
peter1138@openttd.org
Fix eb4ba1991: Signal icons incorrectly positioned in UI. (#10199)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -1678,7 +1678,7 @@ private:
 
		Point offset;
 
		Dimension sprite_size = GetSpriteSize(image, &offset);
 
		Rect ir = r.Shrink(WidgetDimensions::scaled.imgbtn);
 
		int x = CenterBounds(ir.left, ir.right, sprite_size.width - offset.x); // centered
 
		int x = CenterBounds(ir.left, ir.right, sprite_size.width - offset.x) - offset.x; // centered
 
		int y = ir.top - sig_sprite_bottom_offset +
 
				(ir.Height() + sig_sprite_size.height) / 2; // aligned to bottom
 

	
0 comments (0 inline, 0 general)