Remove unnecessary over-complication and fix transitions

This commit is contained in:
Dean Herbert 2019-09-02 13:45:13 +09:00
parent 6603cbd74d
commit d4c12881f5
1 changed files with 6 additions and 24 deletions

View File

@ -83,24 +83,12 @@ public Info()
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
LayoutDuration = transition_duration,
Direction = FillDirection.Full,
Children = new[]
{
source = new MetadataSection("Source"),
new FillFlowContainer
{
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"),
}
},
genre = new MetadataSection("Genre") { Width = 0.5f },
language = new MetadataSection("Language") { Width = 0.5f },
tags = new MetadataSection("Tags"),
},
},
@ -132,8 +120,8 @@ public Info()
{
source.Text = b.NewValue?.Metadata.Source ?? string.Empty;
tags.Text = b.NewValue?.Metadata.Tags ?? string.Empty;
genre.Text = b.NewValue?.OnlineInfo?.Genre?.Name ?? "Unspecified";
language.Text = b.NewValue?.OnlineInfo?.Language?.Name ?? "Unspecified";
genre.Text = b.NewValue?.OnlineInfo?.Genre?.Name ?? string.Empty;
language.Text = b.NewValue?.OnlineInfo?.Language?.Name ?? string.Empty;
};
}
@ -154,7 +142,7 @@ public string Text
{
if (string.IsNullOrEmpty(value))
{
this.FadeOut(transition_duration);
Hide();
return;
}
@ -164,12 +152,6 @@ public string Text
}
}
public Color4 TextColour
{
get => textFlow.Colour;
set => textFlow.Colour = value;
}
public MetadataSection(string title)
{
RelativeSizeAxes = Axes.X;