mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 15:27:20 +08:00
Fix broken ShearedButton
autosizing logic
This commit is contained in:
parent
923d9a4e5f
commit
298efa5391
@ -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 };
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user