misc: chore: More ObservableProperty usage

This commit is contained in:
Evan Husted
2025-01-30 20:16:30 -06:00
parent 9c12f52805
commit 3cf54987d2
7 changed files with 103 additions and 823 deletions

View File

@@ -1,9 +1,10 @@
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using Ryujinx.Ava.UI.ViewModels;
namespace Ryujinx.Ava.UI.Models
{
public class ProfileImageModel : BaseModel
public partial class ProfileImageModel : BaseModel
{
public ProfileImageModel(string name, byte[] data)
{
@@ -14,19 +15,6 @@ namespace Ryujinx.Ava.UI.Models
public string Name { get; set; }
public byte[] Data { get; set; }
private SolidColorBrush _backgroundColor = new(Colors.White);
public SolidColorBrush BackgroundColor
{
get
{
return _backgroundColor;
}
set
{
_backgroundColor = value;
OnPropertyChanged();
}
}
[ObservableProperty] private SolidColorBrush _backgroundColor = new(Colors.White);
}
}