diff --git a/osu.Game/Overlays/Toolbar/ToolbarButton.cs b/osu.Game/Overlays/Toolbar/ToolbarButton.cs index 13b8ba0108..a890e6dac0 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarButton.cs @@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Toolbar tooltipContainer = new FlowContainer { Direction = FlowDirection.VerticalOnly, - AutoSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize Anchor = Anchor.BottomLeft, Position = new Vector2(5, 5), Alpha = 0, @@ -123,6 +123,7 @@ namespace osu.Game.Overlays.Toolbar }; RelativeSizeAxes = Axes.Y; + AutoSizeAxes = Axes.X; } [BackgroundDependencyLoader] @@ -131,14 +132,6 @@ namespace osu.Game.Overlays.Toolbar sampleClick = audio.Sample.Get(@"Menu/menuclick"); } - protected override void Update() - { - base.Update(); - - //todo: find a way to avoid using this (autosize needs to be able to ignore certain drawables.. in this case the tooltip) - Size = new Vector2(Flow.DrawSize.X, 1); - } - protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnClick(InputState state) diff --git a/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs b/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs index a6feffab65..61a1af9537 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs @@ -22,6 +22,7 @@ namespace osu.Game.Overlays.Toolbar public ToolbarUserArea() { RelativeSizeAxes = Axes.Y; + AutoSizeAxes = Axes.X; Children = new Drawable[] { button = new ToolbarUserButton