mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
Fixed #432, inflate is not the best way of increasing a rectangle size.
This commit is contained in:
parent
9634f8abbc
commit
4c6707b468
1 changed files with 5 additions and 3 deletions
|
@ -197,7 +197,7 @@ namespace Greenshot.Forms
|
||||||
private void CaptureForm_Resize(object sender, EventArgs e)
|
private void CaptureForm_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Log.DebugFormat("Resize was called, new size: {0}", this.Bounds);
|
Log.DebugFormat("Resize was called, new size: {0}", this.Bounds);
|
||||||
if (Bounds.Equals(_capture.ScreenBounds))
|
if (_capture.ScreenBounds.Equals(Bounds))
|
||||||
{
|
{
|
||||||
// We have the correct size
|
// We have the correct size
|
||||||
return;
|
return;
|
||||||
|
@ -425,9 +425,11 @@ namespace Greenshot.Forms
|
||||||
else if (_captureRect.Height > 0 && _captureRect.Width > 0)
|
else if (_captureRect.Height > 0 && _captureRect.Width > 0)
|
||||||
{
|
{
|
||||||
// correct the GUI width to real width if Region mode
|
// correct the GUI width to real width if Region mode
|
||||||
if (_captureMode == CaptureMode.Region || _captureMode == CaptureMode.Text)
|
if (_captureMode is CaptureMode.Region or CaptureMode.Text)
|
||||||
{
|
{
|
||||||
_captureRect = _captureRect.Inflate(1, 1);
|
// Correct the rectangle size, by making it 1 pixel bigger
|
||||||
|
// We cannot use inflate, this would make the rect bigger to all sizes.
|
||||||
|
_captureRect = new NativeRect(_captureRect.Top, _captureRect.Left, _captureRect.Width+1, _captureRect.Height+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go and process the capture
|
// Go and process the capture
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue