mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 04:06:05 +13:00
Added offset option to color button
This commit is contained in:
parent
a0255f95a6
commit
5a03d45363
1 changed files with 4 additions and 3 deletions
|
@ -51,6 +51,8 @@ public Color Color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Offset { get; set; } = 3;
|
||||||
|
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool ManualButtonClick { get; set; }
|
public bool ManualButtonClick { get; set; }
|
||||||
|
|
||||||
|
@ -84,9 +86,8 @@ protected override void OnPaint(PaintEventArgs pevent)
|
||||||
{
|
{
|
||||||
base.OnPaint(pevent);
|
base.OnPaint(pevent);
|
||||||
|
|
||||||
int offset = 3;
|
int boxSize = ClientRectangle.Height - Offset * 2;
|
||||||
int boxSize = ClientRectangle.Height - offset * 2;
|
Rectangle boxRectangle = new Rectangle(ClientRectangle.Width - Offset - boxSize, Offset, boxSize, boxSize);
|
||||||
Rectangle boxRectangle = new Rectangle(ClientRectangle.Width - offset - boxSize, offset, boxSize, boxSize);
|
|
||||||
|
|
||||||
Graphics g = pevent.Graphics;
|
Graphics g = pevent.Graphics;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue