1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:52:55 +08:00

Adjust transition for smaller sizes

This commit is contained in:
smoogipoo 2020-05-26 16:27:41 +09:00
parent a1ece4f308
commit c86a003ef9

View File

@ -102,12 +102,14 @@ namespace osu.Game.Screens.Ranking
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(40),
Children = new Drawable[] Children = new Drawable[]
{ {
topLayerContainer = new Container topLayerContainer = new Container
{ {
Name = "Top layer", Name = "Top layer",
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Alpha = 0,
Height = 120, Height = 120,
Children = new Drawable[] Children = new Drawable[]
{ {
@ -214,6 +216,8 @@ namespace osu.Game.Screens.Ranking
// If the top layer was already expanded, then we don't need to wait for the resize and can instead transform immediately. This looks better when changing the panel state. // If the top layer was already expanded, then we don't need to wait for the resize and can instead transform immediately. This looks better when changing the panel state.
using (BeginDelayedSequence(topLayerExpanded ? 0 : resize_duration + top_layer_expand_delay, true)) using (BeginDelayedSequence(topLayerExpanded ? 0 : resize_duration + top_layer_expand_delay, true))
{ {
topLayerContainer.FadeIn();
switch (state) switch (state)
{ {
case PanelState.Expanded: case PanelState.Expanded: