Use system colors for separator lines

This commit is contained in:
Jaex 2018-06-06 15:16:14 +03:00
parent 55623703e2
commit f4e9a105a5
4 changed files with 5 additions and 8 deletions

View file

@ -23,7 +23,6 @@
#endregion License Information (GPL v3)
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
@ -31,15 +30,12 @@ namespace ShareX.HelpersLib
{
public class SplitContainerCustomSplitter : SplitContainer
{
[DefaultValue(typeof(Color), "Black")]
public Color SplitterColor { get; set; } = Color.Black;
protected override void OnPaint(PaintEventArgs pevent)
{
Graphics g = pevent.Graphics;
Rectangle rect = SplitterRectangle;
using (Pen pen = new Pen(SplitterColor))
using (Pen pen = new Pen(ProfessionalColors.SeparatorDark))
{
if (Orientation == Orientation.Horizontal)
{

View file

@ -34,7 +34,10 @@ protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.DrawLine(Pens.DarkGray, new Point(ClientSize.Width - 1, 0), new Point(ClientSize.Width - 1, ClientSize.Height - 1));
using (Pen pen = new Pen(ProfessionalColors.SeparatorDark))
{
e.Graphics.DrawLine(pen, new Point(ClientSize.Width - 1, 0), new Point(ClientSize.Width - 1, ClientSize.Height - 1));
}
}
protected override void OnPaintBackground(PaintEventArgs e)

View file

@ -74,7 +74,6 @@ private void InitializeComponent()
// scMain.Panel2
//
this.scMain.Panel2.Controls.Add(this.panel1);
this.scMain.SplitterColor = System.Drawing.Color.DarkGray;
this.scMain.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.scMain_SplitterMoved);
//
// lvHistory

View file

@ -294,7 +294,6 @@ private void InitializeComponent()
// scMain.Panel2
//
this.scMain.Panel2.Controls.Add(this.pbPreview);
this.scMain.SplitterColor = System.Drawing.Color.DarkGray;
this.scMain.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.scMain_SplitterMoved);
//
// lblMainFormTip