From de9cf751d2f5e17011426a7d93e1c5701b64c676 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 7 Mar 2026 02:51:50 +0900 Subject: [PATCH] Fix `LoadingLayer` centering oops. --- osu.Game/Graphics/UserInterface/LoadingSpinner.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/LoadingSpinner.cs b/osu.Game/Graphics/UserInterface/LoadingSpinner.cs index 24bf86c8ad..a2247006d7 100644 --- a/osu.Game/Graphics/UserInterface/LoadingSpinner.cs +++ b/osu.Game/Graphics/UserInterface/LoadingSpinner.cs @@ -49,9 +49,6 @@ namespace osu.Game.Graphics.UserInterface Anchor = Anchor.Centre; Origin = Anchor.Centre; - // Font awesome icon isn't centered perfectly. - Vector2 spinnerActualCentre = new Vector2(29.78f, 29.78f); - if (withBox) { Child = MainContents = new Container @@ -84,7 +81,6 @@ namespace osu.Game.Graphics.UserInterface { Anchor = Anchor.Centre, Origin = Anchor.Custom, - OriginPosition = spinnerActualCentre, Colour = inverted ? Color4.Black : Color4.White, Scale = new Vector2(0.6f), RelativeSizeAxes = Axes.Both, @@ -108,7 +104,6 @@ namespace osu.Game.Graphics.UserInterface { Anchor = Anchor.Centre, Origin = Anchor.Custom, - OriginPosition = spinnerActualCentre, Colour = inverted ? Color4.Black : Color4.White, RelativeSizeAxes = Axes.Both, Icon = FontAwesome.Solid.CircleNotch @@ -154,6 +149,9 @@ namespace osu.Game.Graphics.UserInterface { base.UpdateAfterChildren(); + // Font awesome icon isn't centered perfectly. + spinner.OriginPosition = spinner.DrawSize * 0.4963333333f; + if (withBox) { MainContents.CornerRadius = MainContents.DrawWidth / 4;