Browse Source

some cleanup

pull/7810/head
daniel mayost 5 years ago
parent
commit
610a138ca7
  1. 19
      src/Avalonia.Controls/Control.cs
  2. 3
      src/Avalonia.Visuals/Visual.cs

19
src/Avalonia.Controls/Control.cs

@ -324,24 +324,17 @@ namespace Avalonia.Controls
protected override void OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T> change)
{
base.OnPropertyChanged(change);
if (change.Property == FlowDirectionProperty)
{
// A change in value inherited should be prevented from calling this method
// because it will be handled from here
if (GetBaseValue(FlowDirectionProperty, change.Priority).HasValue)
InvalidateFlowDirection();
foreach (var visual in VisualChildren)
{
InvalidateFlowDirection();
foreach (var visual in this.GetVisualDescendants())
if (visual is Control child)
{
if (visual is Control child)
{
child.InvalidateFlowDirection();
}
child.InvalidateFlowDirection();
}
InvalidateVisual();
}
}
}

3
src/Avalonia.Visuals/Visual.cs

@ -114,7 +114,8 @@ namespace Avalonia
ClipProperty,
ClipToBoundsProperty,
IsVisibleProperty,
OpacityProperty);
OpacityProperty,
IsMirrorTransformProperty);
RenderTransformProperty.Changed.Subscribe(RenderTransformChanged);
ZIndexProperty.Changed.Subscribe(ZIndexChanged);
}

Loading…
Cancel
Save