mirror of https://github.com/ppy/osu
Remove unnecessary over-complication and fix transitions
This commit is contained in:
parent
6603cbd74d
commit
d4c12881f5
|
@ -83,24 +83,12 @@ public Info()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Full,
|
||||||
LayoutDuration = transition_duration,
|
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
source = new MetadataSection("Source"),
|
source = new MetadataSection("Source"),
|
||||||
new FillFlowContainer
|
genre = new MetadataSection("Genre") { Width = 0.5f },
|
||||||
{
|
language = new MetadataSection("Language") { Width = 0.5f },
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Width = 0.5f,
|
|
||||||
FillMode = FillMode.Fit,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
genre = new MetadataSection("Genre"),
|
|
||||||
language = new MetadataSection("Language"),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tags = new MetadataSection("Tags"),
|
tags = new MetadataSection("Tags"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -132,8 +120,8 @@ public Info()
|
||||||
{
|
{
|
||||||
source.Text = b.NewValue?.Metadata.Source ?? string.Empty;
|
source.Text = b.NewValue?.Metadata.Source ?? string.Empty;
|
||||||
tags.Text = b.NewValue?.Metadata.Tags ?? string.Empty;
|
tags.Text = b.NewValue?.Metadata.Tags ?? string.Empty;
|
||||||
genre.Text = b.NewValue?.OnlineInfo?.Genre?.Name ?? "Unspecified";
|
genre.Text = b.NewValue?.OnlineInfo?.Genre?.Name ?? string.Empty;
|
||||||
language.Text = b.NewValue?.OnlineInfo?.Language?.Name ?? "Unspecified";
|
language.Text = b.NewValue?.OnlineInfo?.Language?.Name ?? string.Empty;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +142,7 @@ public string Text
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
{
|
{
|
||||||
this.FadeOut(transition_duration);
|
Hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,12 +152,6 @@ public string Text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color4 TextColour
|
|
||||||
{
|
|
||||||
get => textFlow.Colour;
|
|
||||||
set => textFlow.Colour = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MetadataSection(string title)
|
public MetadataSection(string title)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
Loading…
Reference in New Issue