1
0
mirror of synced 2024-11-23 22:41:01 +01:00

Change favorite button alignment

This commit is contained in:
shiibe 2022-09-10 12:06:08 -04:00
parent a78bc7ace4
commit f3f6e2ea51

View File

@ -29,22 +29,26 @@ else
<Columns>
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true" Class="clm-row-large">
<CellTemplate>
<MudStack Row="true" AlignItems="AlignItems.Center">
<MudStack>
<MudToggleIconButton Toggled="@context.Item.IsFavorite"
ToggledChanged="@(async () => await OnFavoriteToggled(context.Item))"
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
Title="Add to favorites"
ToggledIcon="@Icons.Material.Filled.Favorite" ToggledColor="@Color.Secondary"
ToggledTitle="Remove from favorites"
Size="Size.Small"
ToggledSize="Size.Small" />
</MudStack>
<MudStack Spacing="0">
<MudText Typo="Typo.body2" Style="font-weight:bold">@GameDataService.GetMusicNameBySongId(context.Item.SongId)</MudText>
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(context.Item.SongId)</MudText>
</MudStack>
</MudStack>
<MudGrid Justify="Justify.Center">
<MudItem xs="10">
<MudStack Spacing="0">
<MudText Typo="Typo.body2" Style="font-weight:bold">@GameDataService.GetMusicNameBySongId(context.Item.SongId)</MudText>
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(context.Item.SongId)</MudText>
</MudStack>
</MudItem>
<MudItem xs="2">
<MudStack Justify="Justify.Center" AlignItems="AlignItems.End" Style="height:100%">
<MudToggleIconButton Toggled="@context.Item.IsFavorite"
ToggledChanged="@(async () => await OnFavoriteToggled(context.Item))"
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
Title="Add to favorites"
ToggledIcon="@Icons.Material.Filled.Favorite" ToggledColor="@Color.Secondary"
ToggledTitle="Remove from favorites"
Size="Size.Small"
ToggledSize="Size.Small" />
</MudStack>
</MudItem>
</MudGrid>
</CellTemplate>
</Column>
<Column T="SongBestData" Field="@nameof(SongBestData.Difficulty)" Title="Course">