mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Fix selection highlight brush
This commit is contained in:
parent
b43c374d86
commit
2465e94206
1 changed files with 5 additions and 3 deletions
|
@ -44,7 +44,7 @@ public class CutOutTool : BaseTool
|
||||||
private Size buttonSize = new Size(80, 40);
|
private Size buttonSize = new Size(80, 40);
|
||||||
private int buttonOffset = 15;
|
private int buttonOffset = 15;
|
||||||
|
|
||||||
private Brush EffectBrush = new SolidBrush(Color.FromArgb(128, Color.Gray));
|
private Brush selectionHighlightBrush = new SolidBrush(Color.FromArgb(128, Color.Gray));
|
||||||
|
|
||||||
public override void OnUpdate()
|
public override void OnUpdate()
|
||||||
{
|
{
|
||||||
|
@ -109,11 +109,11 @@ public override void OnDraw(Graphics g)
|
||||||
{
|
{
|
||||||
if (IsHorizontalTrim)
|
if (IsHorizontalTrim)
|
||||||
{
|
{
|
||||||
g.FillRectangle(EffectBrush, new RectangleF(Rectangle.X, g.ClipBounds.Y, Rectangle.Width, g.ClipBounds.Height));
|
g.FillRectangle(selectionHighlightBrush, new RectangleF(Rectangle.X, g.ClipBounds.Y, Rectangle.Width, g.ClipBounds.Height));
|
||||||
}
|
}
|
||||||
else if (IsVerticalTrim)
|
else if (IsVerticalTrim)
|
||||||
{
|
{
|
||||||
g.FillRectangle(EffectBrush, new RectangleF(g.ClipBounds.X, Rectangle.Y, g.ClipBounds.Width, Rectangle.Height));
|
g.FillRectangle(selectionHighlightBrush, new RectangleF(g.ClipBounds.X, Rectangle.Y, g.ClipBounds.Width, Rectangle.Height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +169,8 @@ public override void Dispose()
|
||||||
{
|
{
|
||||||
base.Dispose();
|
base.Dispose();
|
||||||
|
|
||||||
|
selectionHighlightBrush.Dispose();
|
||||||
|
|
||||||
if ((confirmButton != null && confirmButton.IsCursorHover) || (cancelButton != null && cancelButton.IsCursorHover))
|
if ((confirmButton != null && confirmButton.IsCursorHover) || (cancelButton != null && cancelButton.IsCursorHover))
|
||||||
{
|
{
|
||||||
Manager.Form.SetDefaultCursor();
|
Manager.Form.SetDefaultCursor();
|
||||||
|
|
Loading…
Reference in a new issue