Skip to content

Commit

Permalink
update to new avalonia
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Jul 23, 2024
1 parent 8b79c3d commit 7621314
Show file tree
Hide file tree
Showing 48 changed files with 56 additions and 366 deletions.
7 changes: 0 additions & 7 deletions OneWare.sln
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LanguageSupport", "Language
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneWare.SourceControl", "src\OneWare.SourceControl\OneWare.SourceControl.csproj", "{EB5E9D9F-E3E7-4E19-83BF-41EDE282B6B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneWare.Demo.Browser", "demo\OneWare.Demo.Browser\OneWare.Demo.Browser.csproj", "{4BB8F95D-711C-4BA2-8E7D-A8E2AF37DD2E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneWare.Demo.Desktop", "demo\OneWare.Demo.Desktop\OneWare.Demo.Desktop.csproj", "{420AB56D-4886-490A-BF50-F0ABBB92AD51}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{26CFC267-21D3-4965-B340-0CEB0138CBE5}"
Expand Down Expand Up @@ -219,10 +217,6 @@ Global
{EB5E9D9F-E3E7-4E19-83BF-41EDE282B6B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB5E9D9F-E3E7-4E19-83BF-41EDE282B6B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB5E9D9F-E3E7-4E19-83BF-41EDE282B6B7}.Release|Any CPU.Build.0 = Release|Any CPU
{4BB8F95D-711C-4BA2-8E7D-A8E2AF37DD2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BB8F95D-711C-4BA2-8E7D-A8E2AF37DD2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BB8F95D-711C-4BA2-8E7D-A8E2AF37DD2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BB8F95D-711C-4BA2-8E7D-A8E2AF37DD2E}.Release|Any CPU.Build.0 = Release|Any CPU
{420AB56D-4886-490A-BF50-F0ABBB92AD51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{420AB56D-4886-490A-BF50-F0ABBB92AD51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{420AB56D-4886-490A-BF50-F0ABBB92AD51}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -413,7 +407,6 @@ Global
{3223BF61-BDAB-440D-9158-98C248B971A5} = {0761690C-7DA0-4554-9F6B-211088412DCD}
{2504C4C6-9F71-4C77-AB0D-FB1281CC8A66} = {EB783E04-C3C8-45F8-B810-24798DAE2450}
{FA5D65B7-7396-4FAE-9761-AAD3664011B6} = {4E0B6C8D-B846-4B95-B356-A1B8BDE16B52}
{4BB8F95D-711C-4BA2-8E7D-A8E2AF37DD2E} = {4E0B6C8D-B846-4B95-B356-A1B8BDE16B52}
{420AB56D-4886-490A-BF50-F0ABBB92AD51} = {4E0B6C8D-B846-4B95-B356-A1B8BDE16B52}
{BABC7A6C-9C36-4544-8B32-561A01F1BDF2} = {614F8A02-432E-46B4-B296-6AC04632A86C}
{67A6D0B8-4F0E-48B4-8E10-8A40D7737C62} = {614F8A02-432E-46B4-B296-6AC04632A86C}
Expand Down
2 changes: 1 addition & 1 deletion build/props/Asmichi.ChildProcess.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Asmichi.ChildProcess" Version="0.16.0"/>
<PackageReference Include="Asmichi.ChildProcess" Version="0.17.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Browser.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="11.0.11"/>
<PackageReference Include="Avalonia.Browser" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Controls.ColorPicker.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="11.0.11"/>
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Controls.DataGrid.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.11"/>
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Controls.PanAndZoom.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.0.0.3"/>
<PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.1.0.1"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Desktop.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.11"/>
<PackageReference Include="Avalonia.Desktop" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Diagnostics.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.11" Condition="'$(Configuration)' == 'Debug'"/>
<PackageReference Include="Avalonia.Diagnostics" Version="11.1.0" Condition="'$(Configuration)' == 'Debug'"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Fonts.Inter.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.11"/>
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.ReactiveUI.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.11"/>
<PackageReference Include="Avalonia.ReactiveUI" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Svg.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Svg.Skia" Version="11.0.0"/>
<PackageReference Include="Avalonia.Svg.Skia" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Themes.Simple.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.11"/>
<PackageReference Include="Avalonia.Themes.Simple" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.Xaml.Behaviors.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.10.8"/>
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/Avalonia.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.11"/>
<PackageReference Include="Avalonia" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/AvaloniaEdit.TextMate.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="OneWare.AvaloniaEdit.TextMate" Version="11.0.11"/>
<PackageReference Include="OneWare.AvaloniaEdit.TextMate" Version="11.1.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/props/AvaloniaEdit.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="OneWare.AvaloniaEdit" Version="11.0.11"/>
<PackageReference Include="OneWare.AvaloniaEdit" Version="11.1.0"/>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions build/props/Dock.Avalonia.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Dock.Avalonia" Version="11.0.10"/>
<PackageReference Include="Dock.Model.Mvvm" Version="11.0.10"/>
<PackageReference Include="Dock.Avalonia" Version="11.1.0"/>
<PackageReference Include="Dock.Model.Mvvm" Version="11.1.0"/>
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions build/props/XUnit.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="xunit" Version="2.5.3"/>
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.abstractions" Version="2.0.3"/>
<PackageReference Include="xunit.assert" Version="2.5.3"/>
<PackageReference Include="xunit.core" Version="2.5.3"/>
<PackageReference Include="xunit.extensibility.core" Version="2.5.3"/>
<PackageReference Include="xunit.extensibility.execution" Version="2.5.3"/>
<PackageReference Include="xunit.runner.console" Version="2.5.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3"/>
<PackageReference Include="xunit.assert" Version="2.9.0"/>
<PackageReference Include="xunit.core" Version="2.9.0"/>
<PackageReference Include="xunit.extensibility.core" Version="2.9.0"/>
<PackageReference Include="xunit.extensibility.execution" Version="2.9.0"/>
<PackageReference Include="xunit.runner.console" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.9.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0"/>
</ItemGroup>
</Project>
30 changes: 0 additions & 30 deletions demo/OneWare.Demo.Browser/AppBundle/index.html

This file was deleted.

16 changes: 0 additions & 16 deletions demo/OneWare.Demo.Browser/AppBundle/main.js

This file was deleted.

39 changes: 0 additions & 39 deletions demo/OneWare.Demo.Browser/OneWare.Demo.Browser.csproj

This file was deleted.

30 changes: 0 additions & 30 deletions demo/OneWare.Demo.Browser/Program.cs

This file was deleted.

14 changes: 0 additions & 14 deletions demo/OneWare.Demo.Browser/Properties/launchSettings.json

This file was deleted.

6 changes: 0 additions & 6 deletions demo/OneWare.Demo.Browser/WebDemoApp.cs

This file was deleted.

11 changes: 0 additions & 11 deletions demo/OneWare.Demo.Browser/runtimeconfig.template.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/OneWare.Core/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public override void OnFrameworkInitializationCompleted()

Container.Resolve<ISettingsService>().GetSettingObservable<int>("Editor_FontSize").Subscribe(x =>
{
Resources["EditorFontSize"] = x;
Resources["EditorFontSize"] = (double)x;
});

_ = LoadContentAsync();
Expand Down
9 changes: 5 additions & 4 deletions src/OneWare.Core/Services/HttpService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,20 @@ public async Task<bool> DownloadFileAsync(string url, Stream stream, IProgress<f

var extension = Path.GetExtension(url);

await using var stream = await download.Content.ReadAsStreamAsync(cancellationToken);

switch (extension)
{
case ".svg":
var svg = new SvgSource();
var picture = svg.Load(await download.Content.ReadAsStreamAsync(cancellationToken));
if (picture is not null)
var svg = SvgSource.LoadFromStream(stream);
if (svg is not null)
return new SvgImage
{
Source = svg
};
break;
default:
return new Bitmap(await download.Content.ReadAsStreamAsync(cancellationToken));
return new Bitmap(stream);
}
}
catch (HttpRequestException e)
Expand Down
3 changes: 1 addition & 2 deletions src/OneWare.ErrorList/Views/ErrorListView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<Setter Property="MaxWidth" Value="300" />
<Setter Property="Template">
<ControlTemplate>
<Border Name="PART_ContentPresenter"
Background="{TemplateBinding Background}"
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
Expand Down
4 changes: 1 addition & 3 deletions src/OneWare.ImageViewer/ViewModels/ImageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ protected override void UpdateCurrentFile(IFile? oldFile)
switch (CurrentFile.Extension.ToLower())
{
case ".svg":
var svg = new SvgSource();
var picture = svg.Load(FullPath);
if (picture is not null)
var svg = new SvgSource(new Uri(FullPath));
Image = new SvgImage
{
Source = svg
Expand Down
Loading

0 comments on commit 7621314

Please sign in to comment.