Fixed Styling & (Potential) Fix "No Profiles To Recover"

merge-requests/173/head
_Neo_ 2025-10-20 15:50:47 +03:00
parent 96028daff1
commit 9e2837d885
2 changed files with 19 additions and 4 deletions

View File

@ -9,20 +9,26 @@ namespace Ryujinx.Ava.UI.ViewModels
{
public UserProfileViewModel()
{
Profiles = [];
LostProfiles = [];
IsEmpty = !LostProfiles.Any();
Profiles = new ObservableCollection<BaseModel>();
LostProfiles = new ObservableCollection<UserProfile>();
}
public ObservableCollection<BaseModel> Profiles { get; set; }
public ObservableCollection<UserProfile> LostProfiles { get; set; }
public bool IsEmpty { get; set; }
public bool IsEmpty => !LostProfiles.Any();
public void Dispose()
{
GC.SuppressFinalize(this);
}
public void UpdateLostProfiles(ObservableCollection<UserProfile> newProfiles)
{
LostProfiles = newProfiles;
OnPropertyChanged(nameof(LostProfiles));
OnPropertyChanged(nameof(IsEmpty));
}
}
}

View File

@ -30,6 +30,15 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ItemsSource="{Binding LostProfiles}">
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="10" />
<Setter Property="Margin" Value="0" />
</Style>
<Style Selector="ListBoxItem:selected /template/ Rectangle#SelectionIndicator">
<Setter Property="IsVisible" Value="False" />
</Style>
</ListBox.Styles>
<ListBox.ItemTemplate>
<DataTemplate>
<Border