mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Fix autosize weirdness by specifying a constant size for the x axis
This commit is contained in:
parent
010fa7ed01
commit
c063a73742
@ -121,6 +121,8 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
|
||||
Container axisFlow;
|
||||
|
||||
const float axis_font_size = 12;
|
||||
|
||||
InternalChild = new GridContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
@ -142,7 +144,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
axisFlow = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y
|
||||
Height = axis_font_size,
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -162,7 +164,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = "0",
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.SemiBold)
|
||||
Font = OsuFont.GetFont(size: axis_font_size, weight: FontWeight.SemiBold)
|
||||
});
|
||||
|
||||
for (int i = 1; i <= axis_points; i++)
|
||||
@ -179,7 +181,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
X = -position / 2,
|
||||
Alpha = alpha,
|
||||
Text = axisValue.ToString("-0"),
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.SemiBold)
|
||||
Font = OsuFont.GetFont(size: axis_font_size, weight: FontWeight.SemiBold)
|
||||
});
|
||||
|
||||
axisFlow.Add(new OsuSpriteText
|
||||
@ -190,7 +192,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
X = position / 2,
|
||||
Alpha = alpha,
|
||||
Text = axisValue.ToString("+0"),
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.SemiBold)
|
||||
Font = OsuFont.GetFont(size: axis_font_size, weight: FontWeight.SemiBold)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user