Browse Source
Merge branch 'master' into feature/ImageScaleMode
pull/1762/head
Benedikt Schroeder
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
22 additions and
12 deletions
-
src/Avalonia.Base/AvaloniaObject.cs
-
src/Avalonia.Base/Diagnostics/AvaloniaObjectExtensions.cs
-
src/Avalonia.Base/ValueStore.cs
-
src/Avalonia.Diagnostics/ViewModels/DevToolsViewModel.cs
-
src/OSX/Avalonia.MonoMac/SystemDialogsImpl.cs
|
|
@ -436,7 +436,7 @@ namespace Avalonia |
|
|
/// Gets all priority values set on the object.
|
|
|
/// Gets all priority values set on the object.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <returns>A collection of property/value tuples.</returns>
|
|
|
/// <returns>A collection of property/value tuples.</returns>
|
|
|
internal IDictionary<AvaloniaProperty, PriorityValue> GetSetValues() => Values?.GetSetValues(); |
|
|
internal IDictionary<AvaloniaProperty, object> GetSetValues() => Values?.GetSetValues(); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Forces revalidation of properties when a property value changes.
|
|
|
/// Forces revalidation of properties when a property value changes.
|
|
|
|
|
|
@ -23,15 +23,24 @@ namespace Avalonia.Diagnostics |
|
|
{ |
|
|
{ |
|
|
var set = o.GetSetValues(); |
|
|
var set = o.GetSetValues(); |
|
|
|
|
|
|
|
|
PriorityValue value; |
|
|
if (set.TryGetValue(property, out var obj)) |
|
|
|
|
|
|
|
|
if (set.TryGetValue(property, out value)) |
|
|
|
|
|
{ |
|
|
{ |
|
|
return new AvaloniaPropertyValue( |
|
|
if (obj is PriorityValue value) |
|
|
property, |
|
|
{ |
|
|
o.GetValue(property), |
|
|
return new AvaloniaPropertyValue( |
|
|
(BindingPriority)value.ValuePriority, |
|
|
property, |
|
|
value.GetDiagnostic()); |
|
|
o.GetValue(property), |
|
|
|
|
|
(BindingPriority)value.ValuePriority, |
|
|
|
|
|
value.GetDiagnostic()); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
return new AvaloniaPropertyValue( |
|
|
|
|
|
property, |
|
|
|
|
|
obj, |
|
|
|
|
|
BindingPriority.LocalValue, |
|
|
|
|
|
"Local value"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
@ -100,7 +100,7 @@ namespace Avalonia |
|
|
_owner.PriorityValueChanged(property, priority, oldValue, newValue); |
|
|
_owner.PriorityValueChanged(property, priority, oldValue, newValue); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public IDictionary<AvaloniaProperty, PriorityValue> GetSetValues() => throw new NotImplementedException(); |
|
|
public IDictionary<AvaloniaProperty, object> GetSetValues() => _values; |
|
|
|
|
|
|
|
|
public object GetValue(AvaloniaProperty property) |
|
|
public object GetValue(AvaloniaProperty property) |
|
|
{ |
|
|
{ |
|
|
|
|
|
@ -31,6 +31,7 @@ namespace Avalonia.Diagnostics.ViewModels |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
SelectedTab = 0; |
|
|
root.GetObservable(TopLevel.PointerOverElementProperty) |
|
|
root.GetObservable(TopLevel.PointerOverElementProperty) |
|
|
.Subscribe(x => PointerOverElement = x?.GetType().Name); |
|
|
.Subscribe(x => PointerOverElement = x?.GetType().Name); |
|
|
} |
|
|
} |
|
|
|
|
|
@ -25,9 +25,9 @@ namespace Avalonia.MonoMac |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
if (panel is NSOpenPanel openPanel) |
|
|
if (panel is NSOpenPanel openPanel) |
|
|
tcs.SetResult(openPanel.Urls.Select(url => url.AbsoluteString).ToArray()); |
|
|
tcs.SetResult(openPanel.Urls.Select(url => url.AbsoluteString.Replace("file://", "")).ToArray()); |
|
|
else |
|
|
else |
|
|
tcs.SetResult(new[] { panel.Url.AbsoluteString }); |
|
|
tcs.SetResult(new[] { panel.Url.AbsoluteString.Replace("file://", "") }); |
|
|
} |
|
|
} |
|
|
panel.OrderOut(panel); |
|
|
panel.OrderOut(panel); |
|
|
keyWindow?.MakeKeyAndOrderFront(keyWindow); |
|
|
keyWindow?.MakeKeyAndOrderFront(keyWindow); |
|
|
|