Fixed line drawing on horizontal splitter

This commit is contained in:
Jaex 2017-10-29 10:22:39 +03:00
parent 7cae61c18c
commit c2e0dd7333

View file

@ -41,8 +41,16 @@ protected override void OnPaint(PaintEventArgs pevent)
using (Pen pen = new Pen(SplitterColor))
{
g.DrawLine(pen, rect.Left, rect.Top, rect.Left, rect.Bottom - 1);
g.DrawLine(pen, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom - 1);
if (Orientation == Orientation.Horizontal)
{
g.DrawLine(pen, rect.Left, rect.Top, rect.Right - 1, rect.Top);
g.DrawLine(pen, rect.Left, rect.Bottom - 1, rect.Right - 1, rect.Bottom - 1);
}
else if (Orientation == Orientation.Vertical)
{
g.DrawLine(pen, rect.Left, rect.Top, rect.Left, rect.Bottom - 1);
g.DrawLine(pen, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom - 1);
}
}
}
}