diff --git a/osu.Game/Overlays/Changelog/ChangelogHeader.cs b/osu.Game/Overlays/Changelog/ChangelogHeader.cs index 0cddeabdaa..3b6f0d778d 100644 --- a/osu.Game/Overlays/Changelog/ChangelogHeader.cs +++ b/osu.Game/Overlays/Changelog/ChangelogHeader.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Changelog protected override Drawable CreateBackground() => new HeaderBackground(); - protected override Drawable CreateContent => new Container + protected override Drawable CreateContent() => new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, diff --git a/osu.Game/Overlays/OverlayHeader.cs b/osu.Game/Overlays/OverlayHeader.cs index 72e86b2400..9e88273443 100644 --- a/osu.Game/Overlays/OverlayHeader.cs +++ b/osu.Game/Overlays/OverlayHeader.cs @@ -99,13 +99,15 @@ namespace osu.Game.Overlays } }); - if (CreateContent != null) - flow.Add(CreateContent); + var content = CreateContent(); + + if (content != null) + flow.Add(content); } protected abstract Drawable CreateBackground(); - protected virtual Drawable CreateContent => null; + protected virtual Drawable CreateContent() => null; protected abstract ScreenTitle CreateTitle(); } diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 14430c958e..4a792f7375 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -62,7 +62,7 @@ namespace osu.Game.Overlays.Profile } }; - protected override Drawable CreateContent => new FillFlowContainer + protected override Drawable CreateContent() => new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y,