Browse Source
Merge pull request #8409 from AvaloniaUI/fixes/devtools-promotes-values-to-localvalue
Don't promote layout property values to local values in DevTools.
pull/8440/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
18 additions and
10 deletions
-
src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlLayoutViewModel.cs
|
|
@ -30,20 +30,28 @@ namespace Avalonia.Diagnostics.ViewModels |
|
|
|
|
|
|
|
|
if (control is AvaloniaObject ao) |
|
|
if (control is AvaloniaObject ao) |
|
|
{ |
|
|
{ |
|
|
MarginThickness = ao.GetValue(Layoutable.MarginProperty); |
|
|
try |
|
|
|
|
|
|
|
|
if (HasPadding) |
|
|
|
|
|
{ |
|
|
{ |
|
|
PaddingThickness = ao.GetValue(Decorator.PaddingProperty); |
|
|
_updatingFromControl = true; |
|
|
} |
|
|
MarginThickness = ao.GetValue(Layoutable.MarginProperty); |
|
|
|
|
|
|
|
|
|
|
|
if (HasPadding) |
|
|
|
|
|
{ |
|
|
|
|
|
PaddingThickness = ao.GetValue(Decorator.PaddingProperty); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (HasBorder) |
|
|
if (HasBorder) |
|
|
|
|
|
{ |
|
|
|
|
|
BorderThickness = ao.GetValue(Border.BorderThicknessProperty); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HorizontalAlignment = ao.GetValue(Layoutable.HorizontalAlignmentProperty); |
|
|
|
|
|
VerticalAlignment = ao.GetValue(Layoutable.VerticalAlignmentProperty); |
|
|
|
|
|
} |
|
|
|
|
|
finally |
|
|
{ |
|
|
{ |
|
|
BorderThickness = ao.GetValue(Border.BorderThicknessProperty); |
|
|
_updatingFromControl = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
HorizontalAlignment = ao.GetValue(Layoutable.HorizontalAlignmentProperty); |
|
|
|
|
|
VerticalAlignment = ao.GetValue(Layoutable.VerticalAlignmentProperty); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
UpdateSize(); |
|
|
UpdateSize(); |
|
|
|