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")] [IniProperty("LastCapturedRegion", Description = "The last used region, for reuse in the capture last region")]
public Rectangle LastCapturedRegion { get; set; } 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; 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")] [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 { 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 // 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? // 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; _previousWindowRectangle = windowRect;
_lastWindowRectangleRetrieveTime = now; _lastWindowRectangleRetrieveTime = now;
return windowRect; return windowRect;
@ -1001,7 +1001,7 @@ namespace GreenshotPlugin.Core {
// TODO: Also 8.x? // TODO: Also 8.x?
if (Environment.OSVersion.IsWindows10()) if (Environment.OSVersion.IsWindows10())
{ {
captureRectangle.Inflate(-1, -1); captureRectangle.Inflate(Conf.Win10BorderCrop);
} }
if (autoMode) { if (autoMode) {

View file

@ -43,6 +43,7 @@
<Compile Include="Controls\GreenshotRadioButton.cs"> <Compile Include="Controls\GreenshotRadioButton.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="Core\ExplorerHelper.cs" />
<Compile Include="Effects\AdjustEffect.cs" /> <Compile Include="Effects\AdjustEffect.cs" />
<Compile Include="Effects\BorderEffect.cs" /> <Compile Include="Effects\BorderEffect.cs" />
<Compile Include="Core\CaptureHandler.cs" /> <Compile Include="Core\CaptureHandler.cs" />