From ecf70c1707b300d56c16e7cc171fa2b527284ff0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 17 May 2021 18:55:18 +0900 Subject: [PATCH] Remove unnecessary container --- osu.Game/Screens/Play/SongProgress.cs | 58 +++++++++------------------ 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/osu.Game/Screens/Play/SongProgress.cs b/osu.Game/Screens/Play/SongProgress.cs index f95e6520cc..b7939b5e75 100644 --- a/osu.Game/Screens/Play/SongProgress.cs +++ b/osu.Game/Screens/Play/SongProgress.cs @@ -82,32 +82,26 @@ namespace osu.Game.Screens.Play Children = new Drawable[] { - new SongProgressDisplay + info = new SongProgressInfo { - Children = new Drawable[] - { - info = new SongProgressInfo - { - Origin = Anchor.BottomLeft, - Anchor = Anchor.BottomLeft, - RelativeSizeAxes = Axes.X, - Height = info_height, - }, - graph = new SongProgressGraph - { - RelativeSizeAxes = Axes.X, - Origin = Anchor.BottomLeft, - Anchor = Anchor.BottomLeft, - Height = graph_height, - Margin = new MarginPadding { Bottom = bottom_bar_height }, - }, - bar = new SongProgressBar(bottom_bar_height, graph_height, handle_size) - { - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft, - OnSeek = time => player?.Seek(time), - }, - } + Origin = Anchor.BottomLeft, + Anchor = Anchor.BottomLeft, + RelativeSizeAxes = Axes.X, + Height = info_height, + }, + graph = new SongProgressGraph + { + RelativeSizeAxes = Axes.X, + Origin = Anchor.BottomLeft, + Anchor = Anchor.BottomLeft, + Height = graph_height, + Margin = new MarginPadding { Bottom = bottom_bar_height }, + }, + bar = new SongProgressBar(bottom_bar_height, graph_height, handle_size) + { + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + OnSeek = time => player?.Seek(time), }, }; } @@ -188,19 +182,5 @@ namespace osu.Game.Screens.Play float finalMargin = bottom_bar_height + (AllowSeeking.Value ? handle_size.Y : 0) + (ShowGraph.Value ? graph_height : 0); info.TransformTo(nameof(info.Margin), new MarginPadding { Bottom = finalMargin }, transition_duration, Easing.In); } - - public class SongProgressDisplay : Container - { - public SongProgressDisplay() - { - // TODO: move actual implementation into this. - // exists for skin customisation purposes (interface should be added to this container). - - Masking = true; - RelativeSizeAxes = Axes.Both; - Anchor = Anchor.BottomCentre; - Origin = Anchor.BottomCentre; - } - } } }