diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index ef78899cc..03cbc7119 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -48,7 +48,7 @@ namespace GreenshotPlugin.Core { /// [IniSection("Core", Description="Greenshot core configuration")] public class CoreConfiguration : IniSection { - [IniProperty("Language", Description="The language in IETF format (e.g. en-US)")] + [IniProperty("Language", Description = "The language in IETF format (e.g. en-US)")] public string Language; [IniProperty("RegionHotkey", Description="Hotkey for starting the region capture", DefaultValue="PrintScreen")] @@ -203,6 +203,9 @@ namespace GreenshotPlugin.Core { [IniProperty("EnableSpecialDIBClipboardReader", Description = "Enable a special DIB clipboard reader", DefaultValue="True")] public bool EnableSpecialDIBClipboardReader; + [IniProperty("WindowCornerCutShape", Description = "The cutshape which is used to remove the window corners, is mirrorred for all corners", DefaultValue = "5,3,2,1,1")] + public List WindowCornerCutShape; + // Specifies what THIS build is public BuildStates BuildState = BuildStates.UNSTABLE; @@ -222,9 +225,6 @@ namespace GreenshotPlugin.Core { /// object with the default value for the supplied property public override object GetDefault(string property) { switch(property) { - case "OutputPrintFooterPattern": - - break; case "PluginWhitelist": case "PluginBacklist": return new List(); diff --git a/GreenshotPlugin/Core/WindowsHelper.cs b/GreenshotPlugin/Core/WindowsHelper.cs index b500033d4..141173866 100644 --- a/GreenshotPlugin/Core/WindowsHelper.cs +++ b/GreenshotPlugin/Core/WindowsHelper.cs @@ -973,7 +973,8 @@ namespace GreenshotPlugin.Core { if (capturedBitmap != null) { // Not needed for Windows 8 if (!(Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor >= 2)) { - if (conf.WindowCaptureRemoveCorners && !Maximised) { + // Only if the Inivalue is set, not maximized and it's not a tool window. + if (conf.WindowCaptureRemoveCorners && !Maximised && (this.ExtendedWindowStyle | ExtendedWindowStyleFlags.WS_EX_TOOLWINDOW) != 0) { // Remove corners if (!Image.IsAlphaPixelFormat(capturedBitmap.PixelFormat)) { LOG.Debug("Changing pixelformat to Alpha for the RemoveCorners"); @@ -1016,11 +1017,10 @@ namespace GreenshotPlugin.Core { /// /// The bitmap to remove the corners from. private void RemoveCorners(Bitmap image) { - int [] cornerRange = {5,3,2,1,1}; using (BitmapBuffer buffer = new BitmapBuffer((Bitmap)image, false)) { buffer.Lock(); - for (int y = 0; y < cornerRange.Length; y++) { - for (int x = 0; x < cornerRange[y]; x++) { + for (int y = 0; y < conf.WindowCornerCutShape.Count; y++) { + for (int x = 0; x < conf.WindowCornerCutShape[y]; x++) { buffer.SetColorAt(x, y, Color.Transparent); buffer.SetColorAt(image.Width-1-x, y, Color.Transparent); buffer.SetColorAt(image.Width-1-x, image.Height-1-y, Color.Transparent);