Fix sizing of OsuAnimatedButton and OsuClickableContainer

Was incorrect under some combinations of relative and autosize usage.
This commit is contained in:
Dean Herbert
2019-06-03 13:53:24 +09:00
parent e017350b80
commit 3ef17a54f6
3 changed files with 80 additions and 1 deletions

View File

@ -74,6 +74,12 @@ namespace osu.Game.Graphics.UserInterface
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
if (AutoSizeAxes != Axes.None)
{
content.RelativeSizeAxes = (Axes.Both & ~AutoSizeAxes);
content.AutoSizeAxes = AutoSizeAxes;
}
Enabled.BindValueChanged(enabled => this.FadeColour(enabled.NewValue ? Color4.White : colours.Gray9, 200, Easing.OutQuint), true);
}