Browse Source

remove cliprect from progress bar.

pull/4074/head
Dan Walmsley 6 years ago
parent
commit
51b4c772db
  1. 24
      src/Avalonia.Controls/ProgressBar.cs

24
src/Avalonia.Controls/ProgressBar.cs

@ -8,14 +8,14 @@ namespace Avalonia.Controls
/// A control used to indicate the progress of an operation.
/// </summary>
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<bool> IsIndeterminateProperty =
AvaloniaProperty.Register<ProgressBar, bool>(nameof(IsIndeterminate));
@ -62,14 +62,6 @@ namespace Avalonia.Controls
p => p.ContainerWidth,
(p, o) => p.ContainerWidth = o);
public static readonly DirectProperty<ProgressBar, Geometry> ClipRectProperty =
AvaloniaProperty.RegisterDirect<ProgressBar, Geometry>(
nameof(ClipRect),
p => p.ClipRect,
(p, o) => p.ClipRect = o);
private Border _indicator;
static ProgressBar()
{
ValueProperty.Changed.AddClassHandler<ProgressBar>((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);
}
}
/// <inheritdoc/>
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
{

Loading…
Cancel
Save