Fixed Styling & (Potential) Fix "No Profiles To Recover"
This commit is contained in:
parent
96028daff1
commit
9e2837d885
@ -9,20 +9,26 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
{
|
{
|
||||||
public UserProfileViewModel()
|
public UserProfileViewModel()
|
||||||
{
|
{
|
||||||
Profiles = [];
|
Profiles = new ObservableCollection<BaseModel>();
|
||||||
LostProfiles = [];
|
LostProfiles = new ObservableCollection<UserProfile>();
|
||||||
IsEmpty = !LostProfiles.Any();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<BaseModel> Profiles { get; set; }
|
public ObservableCollection<BaseModel> Profiles { get; set; }
|
||||||
|
|
||||||
public ObservableCollection<UserProfile> LostProfiles { get; set; }
|
public ObservableCollection<UserProfile> LostProfiles { get; set; }
|
||||||
|
|
||||||
public bool IsEmpty { get; set; }
|
public bool IsEmpty => !LostProfiles.Any();
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateLostProfiles(ObservableCollection<UserProfile> newProfiles)
|
||||||
|
{
|
||||||
|
LostProfiles = newProfiles;
|
||||||
|
OnPropertyChanged(nameof(LostProfiles));
|
||||||
|
OnPropertyChanged(nameof(IsEmpty));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,15 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
ItemsSource="{Binding LostProfiles}">
|
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>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border
|
<Border
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user