BUG-2097: Rollback of the change BUG-1965, we need to see what we do with this. For now the crop can be configured in the configuration: Win10BorderCrop

Also forgot to update the GreenshotPlugin.csproj, as a file was added.
This commit is contained in:
Robin 2017-01-12 22:50:22 +01:00
commit de2e92c7b6
3 changed files with 6 additions and 2 deletions

View file

@ -263,6 +263,9 @@ namespace GreenshotPlugin.Core {
[IniProperty("LastCapturedRegion", Description = "The last used region, for reuse in the capture last region")]
public Rectangle LastCapturedRegion { get; set; }
[IniProperty("Win10BorderCrop", Description = "The capture is cropped with these settings, e.g. when you don't want to color around it -1,-1"), DefaultValue("0,0")]
public Size Win10BorderCrop { get; set; }
private Size _iconSize;
[IniProperty("IconSize", Description = "Defines the size of the icons (e.g. for the buttons in the editor), default value 16,16 anything bigger will cause scaling", DefaultValue = "16,16")]
public Size IconSize {

View file

@ -770,7 +770,7 @@ namespace GreenshotPlugin.Core {
{
// Somehow DWM doesn't calculate it corectly, there is a 1 pixel border around the capture
// Remove this border, currently it's fixed but TODO: Make it depend on the OS?
windowRect.Inflate(-1, -1);
windowRect.Inflate(Conf.Win10BorderCrop);
_previousWindowRectangle = windowRect;
_lastWindowRectangleRetrieveTime = now;
return windowRect;
@ -1001,7 +1001,7 @@ namespace GreenshotPlugin.Core {
// TODO: Also 8.x?
if (Environment.OSVersion.IsWindows10())
{
captureRectangle.Inflate(-1, -1);
captureRectangle.Inflate(Conf.Win10BorderCrop);
}
if (autoMode) {