protected virtual void OnPaintForeground(PaintEventArgs e)
{
Color thumbColor, barColor;
if (isHovered && !isPressed && Enabled)
{
thumbColor = MetroPaint.BackColor.TrackBar.Thumb.Hover(Theme);
barColor = MetroPaint.BackColor.TrackBar.Bar.Hover(Theme);
}
else if (isHovered && isPressed && Enabled)
{
thumbColor = MetroPaint.BackColor.TrackBar.Thumb.Press(Theme);
barColor = MetroPaint.BackColor.TrackBar.Bar.Press(Theme);
}
else if (!Enabled)
{
thumbColor = MetroPaint.BackColor.TrackBar.Thumb.Disabled(Theme);
barColor = MetroPaint.BackColor.TrackBar.Bar.Disabled(Theme);
}
else
{
thumbColor = MetroPaint.BackColor.TrackBar.Thumb.Normal(Theme);
barColor = MetroPaint.BackColor.TrackBar.Bar.Normal(Theme);
}
DrawTrackBar(e.Graphics, thumbColor, barColor);
if (displayFocusRectangle && isFocused)
ControlPaint.DrawFocusRectangle(e.Graphics, ClientRectangle);
}