From 28a41dcca6f62efb395fa45808f6354014358689 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 22 Oct 2016 18:05:46 +0900 Subject: [PATCH] Fix FlowContainers. --- osu.Game/GameModes/Menu/ButtonSystem.cs | 3 ++- osu.Game/Online/Chat/Display/ChannelDisplay.cs | 1 + osu.Game/Overlays/Toolbar.cs | 2 ++ osu.Game/Overlays/ToolbarButton.cs | 2 ++ osu.Game/Overlays/ToolbarModeSelector.cs | 1 + osu.Game/VolumeControl.cs | 1 + 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game/GameModes/Menu/ButtonSystem.cs b/osu.Game/GameModes/Menu/ButtonSystem.cs index 4457df3dc7..2bc2913756 100644 --- a/osu.Game/GameModes/Menu/ButtonSystem.cs +++ b/osu.Game/GameModes/Menu/ButtonSystem.cs @@ -80,8 +80,9 @@ namespace osu.Game.GameModes.Menu { Direction = FlowDirection.HorizontalOnly, Anchor = Anchor.Centre, + AutoSizeAxes = Axes.Both, Spacing = new Vector2(-wedge_width, 0), - Children = new Drawable[] + Children = new[] { settingsButton = new Button(@"settings", @"options", FontAwesome.gear, new Color4(85, 85, 85, 255), OnSettings, -wedge_width, Key.O), backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -wedge_width, Key.Escape), diff --git a/osu.Game/Online/Chat/Display/ChannelDisplay.cs b/osu.Game/Online/Chat/Display/ChannelDisplay.cs index 714718990e..7ab351080b 100644 --- a/osu.Game/Online/Chat/Display/ChannelDisplay.cs +++ b/osu.Game/Online/Chat/Display/ChannelDisplay.cs @@ -45,6 +45,7 @@ namespace osu.Game.Online.Chat.Display { Direction = FlowDirection.VerticalOnly, RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Spacing = new Vector2(1, 1) } } diff --git a/osu.Game/Overlays/Toolbar.cs b/osu.Game/Overlays/Toolbar.cs index f771257cec..5e85dd832e 100644 --- a/osu.Game/Overlays/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar.cs @@ -57,6 +57,7 @@ namespace osu.Game.Overlays { Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Y, + AutoSizeAxes = Axes.X, Children = new Drawable[] { new ToolbarButton @@ -85,6 +86,7 @@ namespace osu.Game.Overlays Origin = Anchor.TopRight, Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Y, + AutoSizeAxes = Axes.X, Children = new [] { new ToolbarButton diff --git a/osu.Game/Overlays/ToolbarButton.cs b/osu.Game/Overlays/ToolbarButton.cs index 41eb7a3d20..adc436a3b4 100644 --- a/osu.Game/Overlays/ToolbarButton.cs +++ b/osu.Game/Overlays/ToolbarButton.cs @@ -77,6 +77,7 @@ namespace osu.Game.Overlays Origin = Anchor.TopCentre, Padding = new MarginPadding { Left = 5, Right = 5 }, RelativeSizeAxes = Axes.Y, + AutoSizeAxes = Axes.X, Children = new Drawable[] { DrawableIcon = new TextAwesome @@ -95,6 +96,7 @@ namespace osu.Game.Overlays tooltipContainer = new FlowContainer { Direction = FlowDirection.VerticalOnly, + AutoSizeAxes = Axes.Both, Anchor = Anchor.BottomLeft, Position = new Vector2(5, -5), Alpha = 0, diff --git a/osu.Game/Overlays/ToolbarModeSelector.cs b/osu.Game/Overlays/ToolbarModeSelector.cs index e2b4e91778..934a52ec8b 100644 --- a/osu.Game/Overlays/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/ToolbarModeSelector.cs @@ -44,6 +44,7 @@ namespace osu.Game.Overlays modeButtons = new FlowContainer { RelativeSizeAxes = Axes.Y, + AutoSizeAxes = Axes.X, Direction = FlowDirection.HorizontalOnly, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, diff --git a/osu.Game/VolumeControl.cs b/osu.Game/VolumeControl.cs index 1b13270b30..ca1c27198b 100644 --- a/osu.Game/VolumeControl.cs +++ b/osu.Game/VolumeControl.cs @@ -42,6 +42,7 @@ namespace osu.Game { volumeMetersContainer = new FlowContainer { + AutoSizeAxes = Axes.Both, Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Position = new Vector2(10, 30),