Browse Source

Merge branch 'master' into improve-input-android

pull/8698/head
Dan Walmsley 4 years ago
committed by GitHub
parent
commit
da5dee8d3e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      samples/ControlCatalog.NetCore/Program.cs
  2. 12
      src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs
  3. 10
      src/Avalonia.Controls.DataGrid/Collections/DataGridSortDescription.cs
  4. 3
      src/Avalonia.Dialogs/ManagedFileChooser.cs
  5. 3
      src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs
  6. 70
      src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs
  7. 9
      src/Windows/Avalonia.Win32/Win32Platform.cs

4
samples/ControlCatalog.NetCore/Program.cs

@ -115,10 +115,6 @@ namespace ControlCatalog.NetCore
UseDBusMenu = true, UseDBusMenu = true,
EnableIme = true EnableIme = true
}) })
.With(new Win32PlatformOptions
{
EnableMultitouch = true
})
.UseSkia() .UseSkia()
.AfterSetup(builder => .AfterSetup(builder =>
{ {

12
src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs

@ -47,18 +47,6 @@ namespace Avalonia.Android
} }
} }
[Obsolete("deprecated")]
public override void Invalidate(global::Android.Graphics.Rect dirty)
{
Invalidate();
}
[Obsolete("deprecated")]
public override void Invalidate(int l, int t, int r, int b)
{
Invalidate();
}
public void SurfaceChanged(ISurfaceHolder holder, Format format, int width, int height) public void SurfaceChanged(ISurfaceHolder holder, Format format, int width, int height)
{ {
Log.Info("AVALONIA", "Surface Changed"); Log.Info("AVALONIA", "Surface Changed");

10
src/Avalonia.Controls.DataGrid/Collections/DataGridSortDescription.cs

@ -12,9 +12,6 @@ namespace Avalonia.Collections
{ {
public virtual string PropertyPath => null; public virtual string PropertyPath => null;
[Obsolete("Use Direction property to read or override sorting direction.")]
public virtual bool Descending => Direction == ListSortDirection.Descending;
public virtual ListSortDirection Direction => ListSortDirection.Ascending; public virtual ListSortDirection Direction => ListSortDirection.Ascending;
public bool HasPropertyPath => !String.IsNullOrEmpty(PropertyPath); public bool HasPropertyPath => !String.IsNullOrEmpty(PropertyPath);
public abstract IComparer<object> Comparer { get; } public abstract IComparer<object> Comparer { get; }
@ -254,13 +251,6 @@ namespace Avalonia.Collections
return new DataGridPathSortDescription(propertyPath, direction, null, culture); return new DataGridPathSortDescription(propertyPath, direction, null, culture);
} }
[Obsolete("Use overload taking a ListSortDirection.")]
public static DataGridSortDescription FromPath(string propertyPath, bool descending, CultureInfo culture = null)
{
return new DataGridPathSortDescription(propertyPath, descending ? ListSortDirection.Descending : ListSortDirection.Ascending, null, culture);
}
public static DataGridSortDescription FromPath(string propertyPath, ListSortDirection direction, IComparer comparer) public static DataGridSortDescription FromPath(string propertyPath, ListSortDirection direction, IComparer comparer)
{ {
return new DataGridPathSortDescription(propertyPath, direction, comparer, null); return new DataGridPathSortDescription(propertyPath, direction, comparer, null);

3
src/Avalonia.Dialogs/ManagedFileChooser.cs

@ -36,9 +36,8 @@ namespace Avalonia.Dialogs
if (_quickLinksRoot != null) if (_quickLinksRoot != null)
{ {
var isQuickLink = _quickLinksRoot.IsLogicalAncestorOf(e.Source as Control); var isQuickLink = _quickLinksRoot.IsLogicalAncestorOf(e.Source as Control);
#pragma warning disable CS0618 // Type or member is obsolete
if (e.ClickCount == 2 || isQuickLink) if (e.ClickCount == 2 || isQuickLink)
#pragma warning restore CS0618 // Type or member is obsolete
{ {
if (model.ItemType == ManagedFileChooserItemType.File) if (model.ItemType == ManagedFileChooserItemType.File)
{ {

3
src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs

@ -158,9 +158,6 @@ namespace Avalonia.Markup.Xaml.XamlIl.Runtime
string.Join(",", lst.Select(e => $"`{e.ClrAssemblyName}:{e.ClrNamespace}.{name}`"))); string.Join(",", lst.Select(e => $"`{e.ClrAssemblyName}:{e.ClrNamespace}.{name}`")));
} }
} }
[Obsolete("Don't use", true)]
public static readonly IServiceProvider RootServiceProviderV1 = new RootServiceProvider(null);
// Don't emit debug symbols for this code so debugger will be forced to step into XAML instead // Don't emit debug symbols for this code so debugger will be forced to step into XAML instead
#line hidden #line hidden

70
src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs

@ -1,5 +1,4 @@
using System; using Avalonia.Platform;
using Avalonia.Platform;
using Avalonia.Rendering; using Avalonia.Rendering;
using SkiaSharp; using SkiaSharp;
@ -29,72 +28,5 @@ namespace Avalonia.Skia.Helpers
return new DrawingContextImpl(createInfo); return new DrawingContextImpl(createInfo);
} }
/// <summary>
/// Unsupported - Wraps a GPU Backed SkiaSurface in an Avalonia DrawingContext.
/// </summary>
[Obsolete]
public static IDrawingContextImpl WrapSkiaSurface(this SKSurface surface, GRContext grContext, Vector dpi, params IDisposable[] disposables)
{
var createInfo = new DrawingContextImpl.CreateInfo
{
GrContext = grContext,
Surface = surface,
Dpi = dpi,
DisableTextLcdRendering = false,
};
return new DrawingContextImpl(createInfo, disposables);
}
/// <summary>
/// Unsupported - Wraps a non-GPU Backed SkiaSurface in an Avalonia DrawingContext.
/// </summary>
[Obsolete]
public static IDrawingContextImpl WrapSkiaSurface(this SKSurface surface, Vector dpi, params IDisposable[] disposables)
{
var createInfo = new DrawingContextImpl.CreateInfo
{
Surface = surface,
Dpi = dpi,
DisableTextLcdRendering = false,
};
return new DrawingContextImpl(createInfo, disposables);
}
[Obsolete]
public static IDrawingContextImpl CreateDrawingContext(Size size, Vector dpi, GRContext grContext = null)
{
if (grContext is null)
{
var surface = SKSurface.Create(
new SKImageInfo(
(int)Math.Ceiling(size.Width),
(int)Math.Ceiling(size.Height),
SKImageInfo.PlatformColorType,
SKAlphaType.Premul));
return WrapSkiaSurface(surface, dpi, surface);
}
else
{
var surface = SKSurface.Create(grContext, false,
new SKImageInfo(
(int)Math.Ceiling(size.Width),
(int)Math.Ceiling(size.Height),
SKImageInfo.PlatformColorType,
SKAlphaType.Premul));
return WrapSkiaSurface(surface, grContext, dpi, surface);
}
}
[Obsolete]
public static void DrawTo(this IDrawingContextImpl source, IDrawingContextImpl destination, SKPaint paint = null)
{
var src = (DrawingContextImpl)source;
var dst = (DrawingContextImpl)destination;
dst.Canvas.DrawSurface(src.Surface, new SKPoint(0, 0), paint);
}
} }
} }

9
src/Windows/Avalonia.Win32/Win32Platform.cs

@ -65,15 +65,6 @@ namespace Avalonia
"Microsoft Basic Render" "Microsoft Basic Render"
}; };
/// <summary>
/// Enables multitouch support. The default value is true.
/// </summary>
/// <remarks>
/// Multitouch allows a surface (a touchpad or touchscreen) to recognize the presence of more than one point of contact with the surface at the same time.
/// </remarks>
[Obsolete("Multitouch is always enabled on supported Windows versions")]
public bool? EnableMultitouch { get; set; } = true;
/// <summary> /// <summary>
/// Embeds popups to the window when set to true. The default value is false. /// Embeds popups to the window when set to true. The default value is false.
/// </summary> /// </summary>

Loading…
Cancel
Save