Use auto property.

This commit is contained in:
Huo Yaoyuan
2019-11-12 17:45:42 +08:00
parent 574de39b0d
commit bbeab6fa76
13 changed files with 31 additions and 60 deletions

View File

@ -91,10 +91,9 @@ namespace osu.Game.Overlays.BeatmapSet
private class Statistic : Container, IHasTooltip
{
private readonly string name;
private readonly OsuSpriteText value;
public string TooltipText => name;
public string TooltipText { get; }
public string Value
{
@ -104,7 +103,7 @@ namespace osu.Game.Overlays.BeatmapSet
public Statistic(IconUsage icon, string name)
{
this.name = name;
TooltipText = name;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;