From 9a4b2f0d1dfe607f7bc773be2b47d707fe98bd85 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 27 Dec 2017 21:19:06 +0900 Subject: [PATCH] Apply workaround at two levels --- .../Notifications/NotificationSection.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs index e6587506aa..42fcc3aa0f 100644 --- a/osu.Game/Overlays/Notifications/NotificationSection.cs +++ b/osu.Game/Overlays/Notifications/NotificationSection.cs @@ -15,15 +15,11 @@ using osu.Game.Graphics.Containers; namespace osu.Game.Overlays.Notifications { - public class NotificationSection : FillFlowContainer + public class NotificationSection : AlwaysUpdateFillFlowContainer { private OsuSpriteText titleText; private OsuSpriteText countText; - // this is required to ensure correct layout and scheduling on children. - // the layout portion of this is being tracked as a framework issue (TODO). - protected override bool RequiresChildrenUpdate => true; - private ClearAllButton clearButton; private FlowContainer notifications; @@ -37,6 +33,7 @@ namespace osu.Game.Overlays.Notifications public IEnumerable AcceptTypes; private string clearText; + public string ClearText { get { return clearText; } @@ -114,7 +111,7 @@ namespace osu.Game.Overlays.Notifications }, }, }, - notifications = new FillFlowContainer + notifications = new AlwaysUpdateFillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, @@ -163,4 +160,13 @@ namespace osu.Game.Overlays.Notifications notifications?.Children.ForEach(n => n.Read = true); } } + + public class AlwaysUpdateFillFlowContainer : FillFlowContainer + where T : Drawable + { + // this is required to ensure correct layout and scheduling on children. + // the layout portion of this is being tracked as a framework issue (https://github.com/ppy/osu-framework/issues/1297). + protected override bool RequiresChildrenUpdate => true; + } + }