From 2aa53d444bb3d37a4ccaf0580793fd1bd89b35d6 Mon Sep 17 00:00:00 2001 From: RKrom Date: Thu, 29 Nov 2012 14:02:23 +0000 Subject: [PATCH] Fixed the very old incorrect size information bug git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2333 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/CaptureForm.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs index 0621b1eb5..8641686d6 100644 --- a/Greenshot/Forms/CaptureForm.cs +++ b/Greenshot/Forms/CaptureForm.cs @@ -591,9 +591,16 @@ namespace Greenshot.Forms { // rulers int dist = 8; - string captureWidth = (captureRect.Width + 1).ToString(); - string captureHeight = (captureRect.Height + 1).ToString(); - + string captureWidth; + string captureHeight; + // The following fixes the very old incorrect size information bug + if (captureMode == CaptureMode.Window) { + captureWidth = captureRect.Width.ToString(); + captureHeight = captureRect.Height.ToString(); + } else { + captureWidth = (captureRect.Width + 1).ToString(); + captureHeight = (captureRect.Height + 1).ToString(); + } using (Font rulerFont = new Font(FontFamily.GenericSansSerif, 8)) { Size measureWidth = TextRenderer.MeasureText(captureWidth, rulerFont); Size measureHeight = TextRenderer.MeasureText(captureHeight, rulerFont);