From 454c82c49eb77c228f50c60182ae87b24ec819b2 Mon Sep 17 00:00:00 2001 From: jorolf Date: Thu, 21 Mar 2019 22:18:45 +0100 Subject: [PATCH] Don't go outside of the container bounds --- .../Graphics/UserInterface/ScreenTitle.cs | 35 +++++++++++-------- osu.Game/Screens/Multi/Header.cs | 1 + 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/ScreenTitle.cs b/osu.Game/Graphics/UserInterface/ScreenTitle.cs index 14c87bb59d..dd0b06f969 100644 --- a/osu.Game/Graphics/UserInterface/ScreenTitle.cs +++ b/osu.Game/Graphics/UserInterface/ScreenTitle.cs @@ -44,30 +44,35 @@ namespace osu.Game.Graphics.UserInterface InternalChildren = new Drawable[] { - iconSprite = new SpriteIcon - { - Size = new Vector2(25), - Anchor = Anchor.TopLeft, - Origin = Anchor.TopRight, - Margin = new MarginPadding { Right = 10 }, - }, new FillFlowContainer { AutoSizeAxes = Axes.Both, - Direction = FillDirection.Horizontal, - Spacing = new Vector2(6, 0), - Children = new[] + Spacing = new Vector2(10, 0), + Children = new Drawable[] { - titleText = new OsuSpriteText + iconSprite = new SpriteIcon { - Font = OsuFont.GetFont(size: 25), + Size = new Vector2(25), }, - pageText = new OsuSpriteText + new FillFlowContainer { - Font = OsuFont.GetFont(size: 25), + AutoSizeAxes = Axes.Both, + Direction = FillDirection.Horizontal, + Spacing = new Vector2(6, 0), + Children = new[] + { + titleText = new OsuSpriteText + { + Font = OsuFont.GetFont(size: 25), + }, + pageText = new OsuSpriteText + { + Font = OsuFont.GetFont(size: 25), + } + } } } - } + }, }; } } diff --git a/osu.Game/Screens/Multi/Header.cs b/osu.Game/Screens/Multi/Header.cs index 0f945d107f..3b9bd7ca4a 100644 --- a/osu.Game/Screens/Multi/Header.cs +++ b/osu.Game/Screens/Multi/Header.cs @@ -42,6 +42,7 @@ namespace osu.Game.Screens.Multi { Anchor = Anchor.CentreLeft, Origin = Anchor.BottomLeft, + X = -35, }, breadcrumbs = new HeaderBreadcrumbControl(stack) {