Add White Border to Grippers for Better Contrast on Dark Backgrounds

This commit is contained in:
Greenshot-AppVeyor 2020-05-02 22:33:49 +02:00
commit 46b4e2931d
3 changed files with 8 additions and 5 deletions

View file

@ -147,12 +147,13 @@ namespace Greenshot.Drawing.Adorners
targetGraphics.SmoothingMode = SmoothingMode.None;
targetGraphics.CompositingMode = CompositingMode.SourceCopy;
targetGraphics.PixelOffsetMode = PixelOffsetMode.Half;
targetGraphics.PixelOffsetMode = PixelOffsetMode.None;
targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
try
{
targetGraphics.FillRectangle(Brushes.Black, bounds.X, bounds.Y, bounds.Width, bounds.Height);
targetGraphics.FillRectangle(Brushes.Black, bounds);
targetGraphics.DrawRectangle(new Pen(Brushes.White), bounds);
}
catch
{

View file

@ -174,10 +174,11 @@ namespace Greenshot.Drawing.Adorners
targetGraphics.SmoothingMode = SmoothingMode.None;
targetGraphics.CompositingMode = CompositingMode.SourceCopy;
targetGraphics.PixelOffsetMode = PixelOffsetMode.Half;
targetGraphics.PixelOffsetMode = PixelOffsetMode.None;
targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
targetGraphics.FillRectangle(Brushes.Black, bounds.X, bounds.Y, bounds.Width , bounds.Height);
targetGraphics.FillRectangle(Brushes.Black, bounds);
targetGraphics.DrawRectangle(new Pen(Brushes.White), bounds);
targetGraphics.Restore(state);
}
}

View file

@ -97,7 +97,8 @@ namespace Greenshot.Drawing.Adorners
Graphics targetGraphics = paintEventArgs.Graphics;
var bounds = Bounds;
targetGraphics.FillRectangle(Brushes.Green, bounds.X, bounds.Y, bounds.Width, bounds.Height);
targetGraphics.FillRectangle(Brushes.Green, bounds);
targetGraphics.DrawRectangle(new Pen(Brushes.White), bounds);
}
/// <summary>