Skip to content

Commit

Permalink
Update to 11.0.0-rc1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed May 31, 2023
1 parent 97091a5 commit 91161e2
Show file tree
Hide file tree
Showing 23 changed files with 44 additions and 134 deletions.
2 changes: 1 addition & 1 deletion build/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.0-preview8" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/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.0-preview8" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/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.0-preview8" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/Avalonia.Skia.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.Skia" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Skia" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions build/Avalonia.Themes.Fluent.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="Avalonia.Themes.Fluent" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-rc1.1" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/Avalonia.Web.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.0-preview8" />
<PackageReference Include="Avalonia.Browser" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/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.0-preview8" />
<PackageReference Include="Avalonia" Version="11.0.0-rc1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/Base.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>0.6.0</VersionPrefix>
<VersionSuffix>preview8.2</VersionSuffix>
<VersionSuffix>rc1.1</VersionSuffix>
<AvaloniaVersionPrefix>11.0.0</AvaloniaVersionPrefix>
<AvaloniaVersionSuffix>$(VersionSuffix)</AvaloniaVersionSuffix>
<Authors>Wiesław Šoltés</Authors>
Expand Down
13 changes: 2 additions & 11 deletions src/Avalonia.Controls.Skia/SKBitmapControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Avalonia.Controls.Skia;
/// <summary>
/// SKBitmap control.
/// </summary>
public class SKBitmapControl : Control, IAffectsRender
public class SKBitmapControl : Control
{
/// <summary>
/// Defines the <see cref="Bitmap"/> property.
Expand All @@ -28,9 +28,6 @@ public class SKBitmapControl : Control, IAffectsRender
public static readonly StyledProperty<StretchDirection> StretchDirectionProperty =
AvaloniaProperty.Register<SKBitmapControl, StretchDirection>(nameof(StretchDirection), StretchDirection.Both);

/// <inheritdoc/>
public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SKBitmap"/> bitmap.
/// </summary>
Expand Down Expand Up @@ -139,13 +136,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang

if (change.Property == BitmapProperty)
{
RaiseInvalidated(EventArgs.Empty);
InvalidateVisual();
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
12 changes: 2 additions & 10 deletions src/Avalonia.Controls.Skia/SKBitmapImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ namespace Avalonia.Controls.Skia;
/// <summary>
/// An <see cref="IImage"/> that uses a <see cref="SKBitmapImage"/> for content.
/// </summary>
public class SKBitmapImage : AvaloniaObject, IImage, IAffectsRender
public class SKBitmapImage : AvaloniaObject, IImage
{
/// <summary>
/// Defines the <see cref="Source"/> property.
/// </summary>
public static readonly StyledProperty<SKBitmap?> SourceProperty =
AvaloniaProperty.Register<SKBitmapImage, SKBitmap?>(nameof(Source));

public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SKBitmap"/> content.
/// </summary>
Expand Down Expand Up @@ -60,13 +58,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
base.OnPropertyChanged(change);
if (change.Property == SourceProperty)
{
RaiseInvalidated(EventArgs.Empty);
// TODO: Invalidate IImage
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
15 changes: 3 additions & 12 deletions src/Avalonia.Controls.Skia/SKPathControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Avalonia.Controls.Skia;
/// <summary>
/// SKPath control.
/// </summary>
public class SKPathControl : Control, IAffectsRender
public class SKPathControl : Control
{
/// <summary>
/// Defines the <see cref="Path"/> property.
Expand All @@ -34,9 +34,6 @@ public class SKPathControl : Control, IAffectsRender
public static readonly StyledProperty<StretchDirection> StretchDirectionProperty =
AvaloniaProperty.Register<SKPathControl, StretchDirection>(nameof(StretchDirection), StretchDirection.Both);

/// <inheritdoc/>
public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SKPath"/> path.
/// </summary>
Expand Down Expand Up @@ -160,18 +157,12 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang

if (change.Property == PathProperty)
{
RaiseInvalidated(EventArgs.Empty);
InvalidateVisual();
}

if (change.Property == PaintProperty)
{
RaiseInvalidated(EventArgs.Empty);
InvalidateVisual();
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
12 changes: 2 additions & 10 deletions src/Avalonia.Controls.Skia/SKPathImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Avalonia.Controls.Skia;
/// <summary>
/// An <see cref="IImage"/> that uses a <see cref="SKPath"/> for content.
/// </summary>
public class SKPathImage : AvaloniaObject, IImage, IAffectsRender
public class SKPathImage : AvaloniaObject, IImage
{
/// <summary>
/// Defines the <see cref="Source"/> property.
Expand All @@ -23,8 +23,6 @@ public class SKPathImage : AvaloniaObject, IImage, IAffectsRender
public static readonly StyledProperty<SKPaint?> PaintProperty =
AvaloniaProperty.Register<SKPathImage, SKPaint?>(nameof(Paint));

public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SKPath"/> content.
/// </summary>
Expand Down Expand Up @@ -80,13 +78,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
base.OnPropertyChanged(change);
if (change.Property == SourceProperty)
{
RaiseInvalidated(EventArgs.Empty);
// TODO: Invalidate IImage
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
13 changes: 2 additions & 11 deletions src/Avalonia.Controls.Skia/SKPictureControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Avalonia.Controls.Skia;
/// <summary>
/// SKPicture control.
/// </summary>
public class SKPictureControl : Control, IAffectsRender
public class SKPictureControl : Control
{
/// <summary>
/// Defines the <see cref="Picture"/> property.
Expand All @@ -28,9 +28,6 @@ public class SKPictureControl : Control, IAffectsRender
public static readonly StyledProperty<StretchDirection> StretchDirectionProperty =
AvaloniaProperty.Register<SKPictureControl, StretchDirection>(nameof(StretchDirection), StretchDirection.Both);

/// <inheritdoc/>
public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SKPicture"/> picture.
/// </summary>
Expand Down Expand Up @@ -142,13 +139,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang

if (change.Property == PictureProperty)
{
RaiseInvalidated(EventArgs.Empty);
InvalidateVisual();
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
12 changes: 2 additions & 10 deletions src/Avalonia.Controls.Skia/SKPictureImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ namespace Avalonia.Controls.Skia;
/// <summary>
/// An <see cref="IImage"/> that uses a <see cref="SKPicture"/> for content.
/// </summary>
public class SKPictureImage : AvaloniaObject, IImage, IAffectsRender
public class SKPictureImage : AvaloniaObject, IImage
{
/// <summary>
/// Defines the <see cref="Source"/> property.
/// </summary>
public static readonly StyledProperty<SKPicture?> SourceProperty =
AvaloniaProperty.Register<SKPictureImage, SKPicture?>(nameof(Source));

public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SKPicture"/> content.
/// </summary>
Expand Down Expand Up @@ -60,13 +58,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
base.OnPropertyChanged(change);
if (change.Property == SourceProperty)
{
RaiseInvalidated(EventArgs.Empty);
// TODO: Invalidate IImage
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
13 changes: 2 additions & 11 deletions src/Avalonia.Svg.Skia/Svg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Avalonia.Svg.Skia;
/// <summary>
/// Svg control.
/// </summary>
public class Svg : Control, IAffectsRender
public class Svg : Control
{
private readonly Uri _baseUri;
private SKSvg? _svg;
Expand Down Expand Up @@ -47,9 +47,6 @@ public class Svg : Control, IAffectsRender
o => o.EnableCache,
(o, v) => o.EnableCache = v);

/// <inheritdoc/>
public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the Svg path.
/// </summary>
Expand Down Expand Up @@ -205,7 +202,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
{
var path = change.GetNewValue<string?>();
Load(path);
RaiseInvalidated(EventArgs.Empty);
InvalidateVisual();
}

if (change.Property == EnableCacheProperty)
Expand Down Expand Up @@ -277,10 +274,4 @@ private void DisposeCache()

_cache = null;
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
13 changes: 2 additions & 11 deletions src/Avalonia.Svg.Skia/SvgImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ namespace Avalonia.Svg.Skia;
/// <summary>
/// An <see cref="IImage"/> that uses a <see cref="SvgSource"/> for content.
/// </summary>
public class SvgImage : AvaloniaObject, IImage, IAffectsRender
public class SvgImage : AvaloniaObject, IImage
{
/// <summary>
/// Defines the <see cref="Source"/> property.
/// </summary>
public static readonly StyledProperty<SvgSource?> SourceProperty =
AvaloniaProperty.Register<SvgImage, SvgSource?>(nameof(Source));

/// <inheritdoc/>
public event EventHandler? Invalidated;

/// <summary>
/// Gets or sets the <see cref="SvgSource"/> content.
/// </summary>
Expand Down Expand Up @@ -70,13 +67,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
base.OnPropertyChanged(change);
if (change.Property == SourceProperty)
{
RaiseInvalidated(EventArgs.Empty);
// TODO: Invalidate IImage
}
}

/// <summary>
/// Raises the <see cref="Invalidated"/> event.
/// </summary>
/// <param name="e">The event args.</param>
protected void RaiseInvalidated(EventArgs e) => Invalidated?.Invoke(this, e);
}
4 changes: 1 addition & 3 deletions src/Avalonia.Svg.Skia/SvgSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Diagnostics;
using System.IO;
using System.Net.Http;
using Avalonia.Platform;
using Svg.Skia;

namespace Avalonia.Svg.Skia;
Expand Down Expand Up @@ -60,8 +59,7 @@ public class SvgSource : SKSvg
}
else
{
var loader = AvaloniaLocator.Current.GetService<IAssetLoader>();
var stream = loader?.Open(uri, baseUri);
var stream = Platform.AssetLoader.Open(uri, baseUri);
if (stream is null)
{
return default;
Expand Down
Loading

0 comments on commit 91161e2

Please sign in to comment.