mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Use system colors for separator lines
This commit is contained in:
parent
55623703e2
commit
f4e9a105a5
4 changed files with 5 additions and 8 deletions
|
@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
1
ShareX.HistoryLib/HistoryForm.Designer.cs
generated
1
ShareX.HistoryLib/HistoryForm.Designer.cs
generated
|
@ -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
|
||||
|
|
1
ShareX/Forms/MainForm.Designer.cs
generated
1
ShareX/Forms/MainForm.Designer.cs
generated
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue