Move sizing to ctor

This commit is contained in:
smoogipoo 2019-03-08 15:14:07 +09:00
parent 400514630d
commit 09b5cf4891
1 changed files with 6 additions and 3 deletions

View File

@ -33,6 +33,12 @@ public class Toolbar : OverlayContainer
private readonly Bindable<OverlayActivation> overlayActivationMode = new Bindable<OverlayActivation>(OverlayActivation.All);
public Toolbar()
{
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, HEIGHT);
}
[BackgroundDependencyLoader(true)]
private void load(OsuGame osuGame)
{
@ -77,9 +83,6 @@ private void load(OsuGame osuGame)
}
};
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, HEIGHT);
StateChanged += visibility =>
{
if (overlayActivationMode.Value == OverlayActivation.Disabled)