1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 13:23:05 +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, downloadTracker,
background = new Container background = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Y,
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Child = new Box Child = new Box
@ -165,9 +165,13 @@ namespace osu.Game.Beatmaps.Drawables.Cards
private void updateState() 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); 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); 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.Bindables;
using osu.Framework.Caching; using osu.Framework.Caching;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -18,6 +19,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
public partial class TimelineTickDisplay : TimelinePart<PointVisualisation> 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] [Resolved]
private EditorBeatmap beatmap { get; set; } = null!; 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. // save a few drawables beyond the currently used for edge cases.
while (drawableIndex < Math.Min(usedDrawables + 16, Count)) while (drawableIndex < Math.Min(usedDrawables + 16, Count))
Children[drawableIndex++].Hide(); Children[drawableIndex++].Alpha = 0;
// expire any excess // expire any excess
while (drawableIndex < Count) while (drawableIndex < Count)
@ -182,7 +186,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
point = Children[drawableIndex]; point = Children[drawableIndex];
drawableIndex++; drawableIndex++;
point.Show(); point.Alpha = 1;
return point; return point;
} }