1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 18:07:25 +08:00

Add padding

This commit is contained in:
smoogipoo 2020-06-18 17:06:05 +09:00
parent c31a05977d
commit 6c8a24260b
2 changed files with 7 additions and 3 deletions

View File

@ -227,7 +227,7 @@ namespace osu.Game.Screens.Ranking
scorePanelList.HandleScroll = false; scorePanelList.HandleScroll = false;
panel.Tracking = false; panel.Tracking = false;
panel.MoveTo(new Vector2(scorePanelList.CurrentScrollPosition, panel.GetTrackingPosition().Y), 150, Easing.OutQuint); panel.MoveTo(new Vector2(scorePanelList.CurrentScrollPosition + StatisticsPanel.SIDE_PADDING, panel.GetTrackingPosition().Y), 150, Easing.OutQuint);
} }
} }
} }

View File

@ -10,6 +10,8 @@ namespace osu.Game.Screens.Ranking.Statistics
{ {
public class StatisticsPanel : VisibilityContainer public class StatisticsPanel : VisibilityContainer
{ {
public const float SIDE_PADDING = 30;
protected override bool StartHidden => true; protected override bool StartHidden => true;
public StatisticsPanel(ScoreInfo score) public StatisticsPanel(ScoreInfo score)
@ -24,8 +26,10 @@ namespace osu.Game.Screens.Ranking.Statistics
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding Padding = new MarginPadding
{ {
Left = ScorePanel.EXPANDED_WIDTH + 30 + 50, Left = ScorePanel.EXPANDED_WIDTH + SIDE_PADDING * 3,
Right = 50 Right = SIDE_PADDING,
Top = SIDE_PADDING,
Bottom = 50 // Approximate padding to the bottom of the score panel.
}, },
Child = statisticRows = new FillFlowContainer Child = statisticRows = new FillFlowContainer
{ {