Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bmclane committed Mar 7, 2023
1 parent 7139bff commit b039762
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 104 deletions.
20 changes: 0 additions & 20 deletions src/AlohaKit.Gallery/Views/ProgressBarView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
84 changes: 0 additions & 84 deletions src/AlohaKit/Controls/ProgressBar/Drawable/ProgressBarDrawable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}*/
}
}

0 comments on commit b039762

Please sign in to comment.