From d9872dda12d488d4faf8cde1f8ac76209e232c5a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 26 Feb 2019 16:10:06 +0900 Subject: [PATCH] Use fade instead of negative margin --- osu.Game/Screens/Select/BeatmapDetails.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapDetails.cs b/osu.Game/Screens/Select/BeatmapDetails.cs index c754f1e43a..9f9263927e 100644 --- a/osu.Game/Screens/Select/BeatmapDetails.cs +++ b/osu.Game/Screens/Select/BeatmapDetails.cs @@ -1,4 +1,4 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osuTK; @@ -185,8 +185,6 @@ namespace osu.Game.Screens.Select source.Text = Beatmap.Metadata.Source; tags.Text = Beatmap.Metadata.Tags; - tags.Margin = new MarginPadding { Top = string.IsNullOrEmpty(Beatmap.Metadata.Source) ? -2 * spacing : 0 }; - var requestedBeatmap = Beatmap; if (requestedBeatmap.Metrics == null) { @@ -333,21 +331,18 @@ namespace osu.Game.Screens.Select }; } - public MarginPadding Margin - { - set => textContainer.Margin = value; - } - public string Text { set { if (string.IsNullOrEmpty(value)) { - textContainer.FadeOut(transition_duration); + this.FadeOut(transition_duration); return; } + this.FadeIn(transition_duration); + setTextAsync(value); } }