From b039762f24734055d6c473b4fec8b2767a1a663f Mon Sep 17 00:00:00 2001 From: bmclane Date: Tue, 7 Mar 2023 17:17:55 -0500 Subject: [PATCH] clean up --- .../Views/ProgressBarView.xaml.cs | 20 ----- .../Drawable/ProgressBarDrawable.cs | 84 ------------------- 2 files changed, 104 deletions(-) diff --git a/src/AlohaKit.Gallery/Views/ProgressBarView.xaml.cs b/src/AlohaKit.Gallery/Views/ProgressBarView.xaml.cs index 992d937..6fa3717 100644 --- a/src/AlohaKit.Gallery/Views/ProgressBarView.xaml.cs +++ b/src/AlohaKit.Gallery/Views/ProgressBarView.xaml.cs @@ -65,26 +65,6 @@ void UpdateBrushes() } }; } - - - - /* - var backgroundColor = Colors.Gray; - - if (backgroundColor != null) - { - HorizontalProgressBar.BackgroundColor = backgroundColor; - VerticalProgressBar.BackgroundColor = backgroundColor; - } - - var progressColor = Colors.Red; - - if (progressColor != null) - { - HorizontalProgressBar.ProgressColor = progressColor; - VerticalProgressBar.ProgressColor = progressColor; - }*/ - } Color GetColorFromString(string value) diff --git a/src/AlohaKit/Controls/ProgressBar/Drawable/ProgressBarDrawable.cs b/src/AlohaKit/Controls/ProgressBar/Drawable/ProgressBarDrawable.cs index 55d2902..379871b 100644 --- a/src/AlohaKit/Controls/ProgressBar/Drawable/ProgressBarDrawable.cs +++ b/src/AlohaKit/Controls/ProgressBar/Drawable/ProgressBarDrawable.cs @@ -83,89 +83,5 @@ public virtual void DrawProgress(ICanvas canvas, RectF dirtyRect) canvas.RestoreState(); } - /* - public virtual void DrawTrack(ICanvas canvas, RectF dirtyRect) - { - canvas.SaveState(); - - //canvas.FillColor = StrokeColor; - canvas.SetFillPaint(StrokePaint, dirtyRect); - - float x; - float y; - float width; - float height; - - if (IsVertical) - { - x = (float)(dirtyRect.Width / 2); - y = dirtyRect.Y; - - width = (float)(dirtyRect.Width / 2); - height = dirtyRect.Height; - } - else - { - x = dirtyRect.X; - y = (float)(dirtyRect.Height / 2); - - width = dirtyRect.Width; - height = (float)(dirtyRect.Height / 2); - } - - if (Style == ProgressBarStyle.Square) - canvas.FillRectangle(x, y, width, height); - else - canvas.FillRoundedRectangle(x, y, width, height, CornerRadius); - - canvas.RestoreState(); - } - - public virtual void DrawProgress(ICanvas canvas, RectF dirtyRect) - { - canvas.SaveState(); - - //canvas.FillColor = ProgressColor; - - - float x; - float y; - float width; - float height; - - if (IsVertical) - { - - x = (float)(dirtyRect.Width / 2); - y = dirtyRect.Y + dirtyRect.Height; - - width = (float)(dirtyRect.Width / 2); - height = dirtyRect.Height; - - RectF barRect = new RectF(x, y, width, -(float)(height * Progress)); - canvas.SetFillPaint(ProgressPaint, barRect); - - if (Style == ProgressBarStyle.Square) - canvas.FillRectangle(x, y, width, -(float)(height * Progress)); - else - canvas.FillRoundedRectangle(x, y, width, -(float)(height * Progress), CornerRadius); - } - else - { - x = dirtyRect.X; - y = (float)(dirtyRect.Height / 2); - - width = dirtyRect.Width; - height = dirtyRect.Height / 2; - canvas.SetFillPaint(ProgressPaint, dirtyRect); - - if (Style == ProgressBarStyle.Square) - canvas.FillRectangle(x, y, (float)(width * Progress), height); - else - canvas.FillRoundedRectangle(x, y, (float)(width * Progress), height, CornerRadius); - } - - canvas.RestoreState(); - }*/ } } \ No newline at end of file