mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 04:30:49 +12:00
Fix selection highlight brush
This commit is contained in:
parent
b43c374d86
commit
2465e94206
|
@ -44,7 +44,7 @@ public class CutOutTool : BaseTool
|
|||
private Size buttonSize = new Size(80, 40);
|
||||
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()
|
||||
{
|
||||
|
@ -109,11 +109,11 @@ public override void OnDraw(Graphics g)
|
|||
{
|
||||
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)
|
||||
{
|
||||
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();
|
||||
|
||||
selectionHighlightBrush.Dispose();
|
||||
|
||||
if ((confirmButton != null && confirmButton.IsCursorHover) || (cancelButton != null && cancelButton.IsCursorHover))
|
||||
{
|
||||
Manager.Form.SetDefaultCursor();
|
||||
|
|
Loading…
Reference in a new issue