Browse Source

Merge branch 'master' into standardized-window-startup-size

pull/3009/head
danwalmsley 7 years ago
committed by GitHub
parent
commit
b05dc5b8ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      native/Avalonia.Native/src/OSX/window.mm
  2. 7
      src/Avalonia.Animation/Animatable.cs
  3. 1
      src/Shared/PlatformSupport/AssetLoader.cs

6
native/Avalonia.Native/src/OSX/window.mm

@ -369,12 +369,9 @@ public:
virtual void UpdateCursor() virtual void UpdateCursor()
{ {
[View resetCursorRects];
if (cursor != nil) if (cursor != nil)
{ {
auto rect = [Window frame]; [cursor set];
[View addCursorRect:rect cursor:cursor];
[cursor set];
} }
} }
@ -425,6 +422,7 @@ private:
{ {
WindowEvents = events; WindowEvents = events;
[Window setCanBecomeKeyAndMain]; [Window setCanBecomeKeyAndMain];
[Window disableCursorRects];
} }
virtual HRESULT Show () override virtual HRESULT Show () override

7
src/Avalonia.Animation/Animatable.cs

@ -55,6 +55,11 @@ namespace Avalonia.Animation
} }
set set
{ {
if (value is null)
return;
if (_previousTransitions is null)
_previousTransitions = new Dictionary<AvaloniaProperty, IDisposable>();
SetAndRaise(TransitionsProperty, ref _transitions, value); SetAndRaise(TransitionsProperty, ref _transitions, value);
} }
@ -70,7 +75,7 @@ namespace Avalonia.Animation
if (_transitions is null || _previousTransitions is null || e.Priority == BindingPriority.Animation) return; if (_transitions is null || _previousTransitions is null || e.Priority == BindingPriority.Animation) return;
// PERF-SENSITIVE: Called on every property change. Don't use LINQ here (too many allocations). // PERF-SENSITIVE: Called on every property change. Don't use LINQ here (too many allocations).
foreach (var transition in Transitions) foreach (var transition in _transitions)
{ {
if (transition.Property == e.Property) if (transition.Property == e.Property)
{ {

1
src/Shared/PlatformSupport/AssetLoader.cs

@ -242,6 +242,7 @@ namespace Avalonia.Shared.PlatformSupport
throw new InvalidOperationException( throw new InvalidOperationException(
$"Assembly {name} needs to be referenced and explicitly loaded before loading resources"); $"Assembly {name} needs to be referenced and explicitly loaded before loading resources");
#else #else
name = Uri.UnescapeDataString(name);
AssemblyNameCache[name] = rv = new AssemblyDescriptor(Assembly.Load(name)); AssemblyNameCache[name] = rv = new AssemblyDescriptor(Assembly.Load(name));
#endif #endif
} }

Loading…
Cancel
Save