From 51b4c772db494f166f24fa1cf26033c291ca8566 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 17 Jun 2020 19:07:19 -0300 Subject: [PATCH] remove cliprect from progress bar. --- src/Avalonia.Controls/ProgressBar.cs | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/Avalonia.Controls/ProgressBar.cs b/src/Avalonia.Controls/ProgressBar.cs index 42cad8acd3..fc59f45650 100644 --- a/src/Avalonia.Controls/ProgressBar.cs +++ b/src/Avalonia.Controls/ProgressBar.cs @@ -8,14 +8,14 @@ namespace Avalonia.Controls /// A control used to indicate the progress of an operation. /// public class ProgressBar : RangeBase - { - private Geometry _clipRect; + { private double _Container2Width; private double _ContainerWidth; private double _containerAnimationStartPosition; private double _containerAnimationEndPosition; private double _container2AnimationStartPosition; private double _container2AnimationEndPosition; + private Border _indicator; public static readonly StyledProperty IsIndeterminateProperty = AvaloniaProperty.Register(nameof(IsIndeterminate)); @@ -62,14 +62,6 @@ namespace Avalonia.Controls p => p.ContainerWidth, (p, o) => p.ContainerWidth = o); - public static readonly DirectProperty ClipRectProperty = - AvaloniaProperty.RegisterDirect( - nameof(ClipRect), - p => p.ClipRect, - (p, o) => p.ClipRect = o); - - private Border _indicator; - static ProgressBar() { ValueProperty.Changed.AddClassHandler((x, e) => x.UpdateIndicatorWhenPropChanged(e)); @@ -133,13 +125,7 @@ namespace Avalonia.Controls { get => _container2AnimationEndPosition; set => SetAndRaise(Container2AnimationEndPositionProperty, ref _container2AnimationEndPosition, value); - } - - public Geometry ClipRect - { - get => _clipRect; - set => SetAndRaise(ClipRectProperty, ref _clipRect, value); - } + } /// protected override Size ArrangeOverride(Size finalSize) @@ -198,9 +184,7 @@ namespace Avalonia.Controls padding.Top, bounds.Width - (padding.Right + padding.Left), bounds.Height - (padding.Bottom + padding.Top) - )); - - ClipRect = rectangle; + )); } else {