@@ -40,16 +40,11 @@ public AgentAppViewModel Create(Uuid id, string name, Uri appUri, Uri? iconUrl)
40
40
41
41
public partial class AgentAppViewModel : ObservableObject , IModelMergeable < AgentAppViewModel >
42
42
{
43
- // HACK: We need to set the icon size for SVGs otherwise they might get cut
44
- // off. These must be kept in sync with the XAML code.
45
- public const int IconWidth = 20 ;
46
- public const int IconHeight = 20 ;
47
-
48
43
private readonly ILogger < AgentAppViewModel > _logger ;
49
44
50
45
public required Uuid Id { get ; init ; }
51
46
52
- public required string Name { get ; set ; }
47
+ [ ObservableProperty ] public required partial string Name { get ; set ; }
53
48
54
49
[ ObservableProperty ]
55
50
[ NotifyPropertyChangedFor ( nameof ( Details ) ) ]
@@ -82,11 +77,7 @@ public ImageSource ImageSource
82
77
{
83
78
// TODO: Some SVGs like `/icon/cursor.svg` contain PNG data and
84
79
// don't render at all.
85
- var svg = new SvgImageSource ( IconUrl )
86
- {
87
- RasterizePixelWidth = IconWidth ,
88
- RasterizePixelHeight = IconHeight ,
89
- } ;
80
+ var svg = new SvgImageSource ( IconUrl ) ;
90
81
svg . Opened += ( _ , _ ) => _logger . LogDebug ( "app icon opened (svg): {uri}" , IconUrl ) ;
91
82
svg . OpenFailed += ( _ , args ) =>
92
83
_logger . LogDebug ( "app icon failed to open (svg): {uri}: {Status}" , IconUrl , args . Status ) ;
0 commit comments