private void DrawContextMenuSeparator(Graphics g,
bool vertical,
Rectangle rect,
int horizontalInset,
bool rtl)
{
if (vertical)
{
int l = rect.Width / 2;
int t = rect.Y;
int b = rect.Bottom;
using (Pen marginPen = new Pen(Color.FromArgb(80, KCT.MenuBorder)))
{
marginPen.DashPattern = new float[] { 2, 2 };
g.DrawLine(marginPen, l, t, l, b);
}
}
else
{
int y = rect.Height / 2;
int l = rect.X + (rtl ? 0 : horizontalInset);
int r = rect.Right - (rtl ? horizontalInset : 0);
using (Pen marginPen = new Pen(Color.FromArgb(80, KCT.MenuBorder)))
{
marginPen.DashPattern = new float[] { 2, 2 };
g.DrawLine(marginPen, l, y, r, y);
}
}
}