mirror of https://github.com/ppy/osu
Fix results star rating display not being centered when no mods are present
Needed or the spacing will apply to the fill flow container, causing alignment issues.
This commit is contained in:
parent
493b654011
commit
88cc552534
|
@ -30,6 +30,9 @@ public class ExpandedPanelMiddleContent : CompositeDrawable
|
||||||
private readonly ScoreInfo score;
|
private readonly ScoreInfo score;
|
||||||
|
|
||||||
private readonly List<StatisticDisplay> statisticDisplays = new List<StatisticDisplay>();
|
private readonly List<StatisticDisplay> statisticDisplays = new List<StatisticDisplay>();
|
||||||
|
|
||||||
|
private FillFlowContainer starAndModDisplay;
|
||||||
|
|
||||||
private RollingCounter<long> scoreCounter;
|
private RollingCounter<long> scoreCounter;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -119,7 +122,7 @@ private void load(Bindable<WorkingBeatmap> working)
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
AlwaysPresent = true
|
AlwaysPresent = true
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
starAndModDisplay = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -132,15 +135,6 @@ private void load(Bindable<WorkingBeatmap> working)
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft
|
Origin = Anchor.CentreLeft
|
||||||
},
|
},
|
||||||
new ModDisplay
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
DisplayUnrankedText = false,
|
|
||||||
ExpansionMode = ExpansionMode.AlwaysExpanded,
|
|
||||||
Scale = new Vector2(0.5f),
|
|
||||||
Current = { Value = score.Mods }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
|
@ -215,6 +209,19 @@ private void load(Bindable<WorkingBeatmap> working)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (score.Mods.Any())
|
||||||
|
{
|
||||||
|
starAndModDisplay.Add(new ModDisplay
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
DisplayUnrankedText = false,
|
||||||
|
ExpansionMode = ExpansionMode.AlwaysExpanded,
|
||||||
|
Scale = new Vector2(0.5f),
|
||||||
|
Current = { Value = score.Mods }
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
|
Loading…
Reference in New Issue