Fix eb4ba1991: Signal icons incorrectly positioned in UI. (#10199)

(cherry picked from commit 387c57b023)
This commit is contained in:
PeterN
2022-11-28 20:03:27 +00:00
committed by Jonathan G Rennison
parent 5bbf1f5375
commit b79360862d

View File

@@ -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