mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update sizing as early as possible in addition to scheduling (to handle any dependent edge cases)
This commit is contained in:
@ -112,7 +112,15 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Schedule(() =>
|
// run this once initially to bring things into a sane state as early as possible.
|
||||||
|
updateSizing();
|
||||||
|
|
||||||
|
// run this once after construction to handle the case the changes are made in a BDL/LoadComplete call.
|
||||||
|
Schedule(updateSizing);
|
||||||
|
|
||||||
|
return children;
|
||||||
|
|
||||||
|
void updateSizing()
|
||||||
{
|
{
|
||||||
var autoSize = created.RelativeSizeAxes == Axes.None;
|
var autoSize = created.RelativeSizeAxes == Axes.None;
|
||||||
|
|
||||||
@ -123,9 +131,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
outlineBox.Alpha = autoSize ? 1 : 0;
|
outlineBox.Alpha = autoSize ? 1 : 0;
|
||||||
});
|
}
|
||||||
|
|
||||||
return children;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Reference in New Issue
Block a user