mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 04:12:55 +08:00
Apply workaround at two levels
This commit is contained in:
parent
3428cf6501
commit
9a4b2f0d1d
@ -15,15 +15,11 @@ using osu.Game.Graphics.Containers;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Notifications
|
namespace osu.Game.Overlays.Notifications
|
||||||
{
|
{
|
||||||
public class NotificationSection : FillFlowContainer
|
public class NotificationSection : AlwaysUpdateFillFlowContainer<Drawable>
|
||||||
{
|
{
|
||||||
private OsuSpriteText titleText;
|
private OsuSpriteText titleText;
|
||||||
private OsuSpriteText countText;
|
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 ClearAllButton clearButton;
|
||||||
|
|
||||||
private FlowContainer<Notification> notifications;
|
private FlowContainer<Notification> notifications;
|
||||||
@ -37,6 +33,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
public IEnumerable<Type> AcceptTypes;
|
public IEnumerable<Type> AcceptTypes;
|
||||||
|
|
||||||
private string clearText;
|
private string clearText;
|
||||||
|
|
||||||
public string ClearText
|
public string ClearText
|
||||||
{
|
{
|
||||||
get { return clearText; }
|
get { return clearText; }
|
||||||
@ -114,7 +111,7 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
notifications = new FillFlowContainer<Notification>
|
notifications = new AlwaysUpdateFillFlowContainer<Notification>
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
@ -163,4 +160,13 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
notifications?.Children.ForEach(n => n.Read = true);
|
notifications?.Children.ForEach(n => n.Read = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AlwaysUpdateFillFlowContainer<T> : FillFlowContainer<T>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user