project: downgrade AvaloniaUI to 11.0.13

This commit is contained in:
leo 2024-08-11 09:18:06 +08:00
parent 492859f470
commit e2da0d3643
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View file

@ -37,12 +37,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.2" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.2" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.1.2" />
<PackageReference Include="Avalonia" Version="11.0.13" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.13" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.13" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.13" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.13" Condition="'$(Configuration)' == 'Debug'" />
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.1.0" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.1.2" Condition="'$(Configuration)' == 'Debug'" />
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.1.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="TextMateSharp.Grammars" Version="1.0.60" />

View file

@ -158,7 +158,7 @@ namespace SourceGit.Views
IsTag = decorator.Type == Models.DecoratorType.Tag,
};
var geo = null as StreamGeometry;
StreamGeometry geo;
switch (decorator.Type)
{
case Models.DecoratorType.CurrentBranchHead:
@ -176,7 +176,7 @@ namespace SourceGit.Views
break;
}
var drawGeo = geo.Clone();
var drawGeo = geo!.Clone();
var iconBounds = drawGeo.Bounds;
var translation = Matrix.CreateTranslation(-(Vector)iconBounds.Position);
var scale = Math.Min(8.0 / iconBounds.Width, 8.0 / iconBounds.Height);