1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 21:27:19 +08:00

Fix broken ShearedButton autosizing logic

This commit is contained in:
Bartłomiej Dach 2022-07-22 21:40:24 +02:00
parent 923d9a4e5f
commit 298efa5391
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -97,7 +97,7 @@ namespace osu.Game.Graphics.UserInterface
{
backgroundLayer = new Container
{
RelativeSizeAxes = Axes.Both,
RelativeSizeAxes = Axes.Y,
CornerRadius = corner_radius,
Masking = true,
BorderThickness = 2,
@ -128,10 +128,12 @@ namespace osu.Game.Graphics.UserInterface
if (width != null)
{
Width = width.Value;
backgroundLayer.RelativeSizeAxes = Axes.Both;
}
else
{
AutoSizeAxes = Axes.X;
backgroundLayer.AutoSizeAxes = Axes.X;
text.Margin = new MarginPadding { Horizontal = 15 };
}
}