Use padding instead of FillFlow.Spacing to avoid artifact during animation

This commit is contained in:
Dean Herbert 2022-09-12 16:46:45 +09:00
parent a506178571
commit 5a02e1e713
3 changed files with 3 additions and 2 deletions

View File

@ -78,7 +78,6 @@ namespace osu.Game.Overlays
{
LayoutDuration = 150,
LayoutEasing = Easing.OutQuart,
Spacing = new Vector2(3),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
},

View File

@ -113,6 +113,9 @@ namespace osu.Game.Overlays.Notifications
},
dragContainer = new DragContainer(this)
{
// Use margin instead of FillFlow spacing to fix extra padding appearing when notification shrinks
// in height.
Padding = new MarginPadding { Vertical = 3f },
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
}.WithChild(MainContent = new Container

View File

@ -106,7 +106,6 @@ namespace osu.Game.Overlays.Notifications
RelativeSizeAxes = Axes.X,
LayoutDuration = 150,
LayoutEasing = Easing.OutQuart,
Spacing = new Vector2(3),
}
});
}