Apply corner radius at a higher level so hover click sounds account for it

This commit is contained in:
Joseph Madamba 2024-08-01 18:45:47 -07:00
parent 0fac8148ed
commit 1e38d1fa57
1 changed files with 5 additions and 3 deletions

View File

@ -43,6 +43,9 @@ public DrawableCollectionListItem(Live<BeatmapCollection> item, bool isCreated)
// //
// if we want to support user sorting (but changes will need to be made to realm to persist). // if we want to support user sorting (but changes will need to be made to realm to persist).
ShowDragHandle.Value = false; ShowDragHandle.Value = false;
Masking = true;
CornerRadius = item_height / 2;
} }
protected override Drawable CreateContent() => new ItemContent(Model); protected override Drawable CreateContent() => new ItemContent(Model);
@ -50,7 +53,7 @@ public DrawableCollectionListItem(Live<BeatmapCollection> item, bool isCreated)
/// <summary> /// <summary>
/// The main content of the <see cref="DrawableCollectionListItem"/>. /// The main content of the <see cref="DrawableCollectionListItem"/>.
/// </summary> /// </summary>
private partial class ItemContent : CircularContainer private partial class ItemContent : CompositeDrawable
{ {
private readonly Live<BeatmapCollection> collection; private readonly Live<BeatmapCollection> collection;
@ -65,13 +68,12 @@ public ItemContent(Live<BeatmapCollection> collection)
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = item_height; Height = item_height;
Masking = true;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
Children = new[] InternalChildren = new[]
{ {
collection.IsManaged collection.IsManaged
? new DeleteButton(collection) ? new DeleteButton(collection)