1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Merge branch 'master' into editor-performance

This commit is contained in:
Andrei Zavatski 2024-03-18 20:34:48 +03:00
commit 57399e9899
2 changed files with 13 additions and 5 deletions

View File

@ -77,7 +77,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
downloadTracker,
background = new Container
{
RelativeSizeAxes = Axes.Both,
RelativeSizeAxes = Axes.Y,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Child = new Box
@ -165,9 +165,13 @@ namespace osu.Game.Beatmaps.Drawables.Cards
private void updateState()
{
float targetWidth = Width - (ShowDetails.Value ? ButtonsExpandedWidth : ButtonsCollapsedWidth);
float buttonAreaWidth = ShowDetails.Value ? ButtonsExpandedWidth : ButtonsCollapsedWidth;
float mainAreaWidth = Width - buttonAreaWidth;
mainArea.ResizeWidthTo(targetWidth, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
mainArea.ResizeWidthTo(mainAreaWidth, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
// By limiting the width we avoid this box showing up as an outline around the drawables that are on top of it.
background.ResizeWidthTo(buttonAreaWidth + BeatmapCard.CORNER_RADIUS, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
background.FadeColour(downloadTracker.State.Value == DownloadState.LocallyAvailable ? colours.Lime0 : colourProvider.Background3, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
buttons.FadeTo(ShowDetails.Value ? 1 : 0, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);

View File

@ -7,6 +7,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Caching;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
@ -18,6 +19,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
public partial class TimelineTickDisplay : TimelinePart<PointVisualisation>
{
// With current implementation every tick in the sub-tree should be visible, no need to check whether they are masked away.
public override bool UpdateSubTreeMasking(Drawable source, RectangleF maskingBounds) => false;
[Resolved]
private EditorBeatmap beatmap { get; set; } = null!;
@ -165,7 +169,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
// save a few drawables beyond the currently used for edge cases.
while (drawableIndex < Math.Min(usedDrawables + 16, Count))
Children[drawableIndex++].Hide();
Children[drawableIndex++].Alpha = 0;
// expire any excess
while (drawableIndex < Count)
@ -182,7 +186,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
point = Children[drawableIndex];
drawableIndex++;
point.Show();
point.Alpha = 1;
return point;
}