Reduce unnecessary container nesting and adjust empty state opacity slightly

This commit is contained in:
Dean Herbert
2022-01-30 14:14:50 +09:00
parent 2ee0db0ebf
commit 8917ab78f4
3 changed files with 14 additions and 23 deletions

View File

@ -894,10 +894,8 @@ namespace osu.Game.Screens.Select
// child items (difficulties) are still visible.
item.Header.X = offsetX(dist, visibleHalfHeight) - (parent?.X ?? 0);
// We are applying a multiplicative alpha (which is internally done by nesting an
// additional container and setting that container's alpha) such that we can
// layer alpha transformations on top.
item.SetMultiplicativeAlpha(Math.Clamp(1.75f - 1.5f * dist, 0, 1));
// We are applying alpha to the header here such that we can layer alpha transformations on top.
item.Header.Alpha = Math.Clamp(1.75f - 1.5f * dist, 0, 1);
}
private enum PendingScrollOperation