mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 03:22:54 +08:00
Move scale-on-expand logic to BeatmapCardContent
This commit is contained in:
parent
d6f6039934
commit
33e930f477
@ -280,10 +280,6 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
buttonContainer.ShowDetails.Value = showDetails;
|
buttonContainer.ShowDetails.Value = showDetails;
|
||||||
thumbnail.Dimmed.Value = showDetails;
|
thumbnail.Dimmed.Value = showDetails;
|
||||||
|
|
||||||
// Scale value is intentionally chosen to fit in the spacing of listing displays, as to not overlap horizontally with adjacent cards.
|
|
||||||
// This avoids depth issues where a hovered (scaled) card to the right of another card would be beneath the card to the left.
|
|
||||||
content.ScaleTo(Expanded.Value ? 1.03f : 1, 500, Easing.OutQuint);
|
|
||||||
|
|
||||||
statisticsContainer.FadeTo(showDetails ? 1 : 0, TRANSITION_DURATION, Easing.OutQuint);
|
statisticsContainer.FadeTo(showDetails ? 1 : 0, TRANSITION_DURATION, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,6 +139,10 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
|
// Scale value is intentionally chosen to fit in the spacing of listing displays, as to not overlap horizontally with adjacent cards.
|
||||||
|
// This avoids depth issues where a hovered (scaled) card to the right of another card would be beneath the card to the left.
|
||||||
|
this.ScaleTo(Expanded.Value ? 1.03f : 1, 500, Easing.OutQuint);
|
||||||
|
|
||||||
background.FadeTo(Expanded.Value ? 1 : 0, BeatmapCardBase.TRANSITION_DURATION, Easing.OutQuint);
|
background.FadeTo(Expanded.Value ? 1 : 0, BeatmapCardBase.TRANSITION_DURATION, Easing.OutQuint);
|
||||||
dropdownContent.FadeTo(Expanded.Value ? 1 : 0, BeatmapCardBase.TRANSITION_DURATION, Easing.OutQuint);
|
dropdownContent.FadeTo(Expanded.Value ? 1 : 0, BeatmapCardBase.TRANSITION_DURATION, Easing.OutQuint);
|
||||||
borderContainer.FadeTo(Expanded.Value ? 1 : 0, BeatmapCardBase.TRANSITION_DURATION, Easing.OutQuint);
|
borderContainer.FadeTo(Expanded.Value ? 1 : 0, BeatmapCardBase.TRANSITION_DURATION, Easing.OutQuint);
|
||||||
|
@ -312,10 +312,6 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
|
|
||||||
buttonContainer.ShowDetails.Value = showDetails;
|
buttonContainer.ShowDetails.Value = showDetails;
|
||||||
thumbnail.Dimmed.Value = showDetails;
|
thumbnail.Dimmed.Value = showDetails;
|
||||||
|
|
||||||
// Scale value is intentionally chosen to fit in the spacing of listing displays, as to not overlap horizontally with adjacent cards.
|
|
||||||
// This avoids depth issues where a hovered (scaled) card to the right of another card would be beneath the card to the left.
|
|
||||||
content.ScaleTo(Expanded.Value ? 1.03f : 1, 500, Easing.OutQuint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user