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