diff --git a/Documents/Help/Changelog.md b/Documents/Help/Changelog.md index 2df1802e6..6f0cc8c9e 100644 --- a/Documents/Help/Changelog.md +++ b/Documents/Help/Changelog.md @@ -6,7 +6,8 @@ * Fixed [#315](https://github.com/Krypton-Suite/Standard-Toolkit/issues/315), When adding a new KContextmenu, How do you change it's name etc - Sort out the Callback actions that were removed * Fixed [#323](https://github.com/Krypton-Suite/Standard-Toolkit/issues/323), `KryptonCheckButton` Click removes image - +* Fixed [#333](https://github.com/Krypton-Suite/Standard-Toolkit/issues/333), Krypton Form - ButtonSpec (And Icon), are Cut Off when maximised + ======= ## 2021-09-01 - Build 2109 - September 2021 (Canary) diff --git a/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs b/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs index 73482bfb9..1e47fc029 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs @@ -1198,7 +1198,7 @@ public static Padding GetWindowBorders(CreateParams cp) PI.AdjustWindowRectEx(ref rect, cp.Style, false, cp.ExStyle); // Return the per side border values - return new Padding(-rect.left, -rect.top, rect.right, rect.bottom); + return new Padding(-rect.left, Math.Max(16,-rect.top), rect.right, rect.bottom); } /// diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2007Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2007Base.cs index 4249f5944..09cddb274 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2007Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2007Base.cs @@ -24,7 +24,7 @@ public abstract class PaletteOffice2007Base : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingDock = new(2, 2, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, 2, 3, 0); + private static readonly Padding _contentPaddingHeaderForm = new(10, 6, 3, 0); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 1, 3, 1); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonCalendar = new(-1); @@ -49,7 +49,7 @@ public abstract class PaletteOffice2007Base : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingInputControl = new(0, 1, 0, 1); private static readonly Padding _metricPaddingBarInside = new(3); private static readonly Padding _metricPaddingBarTabs = new(0); @@ -2804,7 +2804,7 @@ public override int GetMetricInt(PaletteState state, PaletteMetricInt metric) case PaletteMetricInt.CheckButtonGap: return 5; case PaletteMetricInt.HeaderButtonEdgeInsetForm: - return 4; + return 9; // Needs to be the RealWindowBorderWidth Offset - No idea how to get it at this point case PaletteMetricInt.HeaderButtonEdgeInsetInputControl: return 1; case PaletteMetricInt.HeaderButtonEdgeInsetPrimary: diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2010Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2010Base.cs index 9184647aa..a3a9075b2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2010Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2010Base.cs @@ -24,7 +24,7 @@ public abstract class PaletteOffice2010Base : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingDock = new(2, 2, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, 2, 3, 0); + private static readonly Padding _contentPaddingHeaderForm = new(10, 6, 3, 0); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 1, 3, 1); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonInputControl = new(0); @@ -48,7 +48,7 @@ public abstract class PaletteOffice2010Base : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingInputControl = new(0, 1, 0, 1); private static readonly Padding _metricPaddingBarInside = new(3); private static readonly Padding _metricPaddingBarTabs = new(0); @@ -2748,7 +2748,7 @@ public override int GetMetricInt(PaletteState state, PaletteMetricInt metric) case PaletteMetricInt.CheckButtonGap: return 5; case PaletteMetricInt.HeaderButtonEdgeInsetForm: - return 4; + return 9; // Needs to be the RealWindowBorderWidth Offset - No idea how to get it at this point case PaletteMetricInt.HeaderButtonEdgeInsetInputControl: return 1; case PaletteMetricInt.HeaderButtonEdgeInsetPrimary: diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2013Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2013Base.cs index 9cef5e153..33d9ce7fa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2013Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice2013Base.cs @@ -24,7 +24,7 @@ public abstract class PaletteOffice2013Base : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingDock = new(2, 2, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, 2, 3, 0); + private static readonly Padding _contentPaddingHeaderForm = new(10, 6, 3, 0); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 1, 3, 1); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonInputControl = new(0); @@ -48,7 +48,7 @@ public abstract class PaletteOffice2013Base : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingInputControl = new(0, 1, 0, 1); private static readonly Padding _metricPaddingBarInside = new(3); private static readonly Padding _metricPaddingBarTabs = new(0); @@ -114,22 +114,22 @@ public abstract class PaletteOffice2013Base : PaletteBase private static readonly Color _formCloseCheckedTracking1 = Color.FromArgb(255, 132, 130); private static readonly Color _formCloseCheckedTracking2 = Color.FromArgb(255, 132, 130); private static readonly Color[] _appButtonNormal = { Color.FromArgb(243, 245, 248), - Color.FromArgb(214, 220, 231), - Color.FromArgb(188, 198, 211), - Color.FromArgb(254, 254, 255), + Color.FromArgb(214, 220, 231), + Color.FromArgb(188, 198, 211), + Color.FromArgb(254, 254, 255), Color.FromArgb(206, 213, 225) }; - private static readonly Color[] _appButtonTrack = { Color.FromArgb(255, 251, 230), + private static readonly Color[] _appButtonTrack = { Color.FromArgb(255, 251, 230), Color.FromArgb(248, 230, 143), - Color.FromArgb(238, 213, 126), - Color.FromArgb(254, 247, 129), + Color.FromArgb(238, 213, 126), + Color.FromArgb(254, 247, 129), Color.FromArgb(240, 201, 41) }; - private static readonly Color[] _appButtonPressed = { Color.FromArgb(235, 227, 196), + private static readonly Color[] _appButtonPressed = { Color.FromArgb(235, 227, 196), Color.FromArgb(228, 198, 149), - Color.FromArgb(166, 97, 7), + Color.FromArgb(166, 97, 7), Color.FromArgb(242, 155, 57), Color.FromArgb(236, 136, 9) }; @@ -2793,7 +2793,7 @@ public override int GetMetricInt(PaletteState state, PaletteMetricInt metric) case PaletteMetricInt.CheckButtonGap: return 5; case PaletteMetricInt.HeaderButtonEdgeInsetForm: - return 4; + return 9; // Needs to be the RealWindowBorderWidth Offset - No idea how to get it at this point case PaletteMetricInt.HeaderButtonEdgeInsetInputControl: return 1; case PaletteMetricInt.HeaderButtonEdgeInsetPrimary: diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice365Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice365Base.cs index 8f905e9dd..78045910a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice365Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteOffice365Base.cs @@ -25,7 +25,7 @@ public abstract class PaletteOffice365Base : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingDock = new(2, 2, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, 2, 3, 0); + private static readonly Padding _contentPaddingHeaderForm = new(10, 6, 3, 0); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 1, 3, 1); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonInputControl = new(0); @@ -49,7 +49,7 @@ public abstract class PaletteOffice365Base : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingInputControl = new(0, 1, 0, 1); private static readonly Padding _metricPaddingBarInside = new(3); private static readonly Padding _metricPaddingBarTabs = new(0); @@ -114,24 +114,24 @@ public abstract class PaletteOffice365Base : PaletteBase private static readonly Color _formCloseChecked2 = Color.FromArgb(255, 132, 130); private static readonly Color _formCloseCheckedTracking1 = Color.FromArgb(255, 132, 130); private static readonly Color _formCloseCheckedTracking2 = Color.FromArgb(255, 132, 130); - private static readonly Color[] _appButtonNormal = { Color.FromArgb(243, 245, 248), - Color.FromArgb(214, 220, 231), - Color.FromArgb(188, 198, 211), - Color.FromArgb(254, 254, 255), + private static readonly Color[] _appButtonNormal = { Color.FromArgb(243, 245, 248), + Color.FromArgb(214, 220, 231), + Color.FromArgb(188, 198, 211), + Color.FromArgb(254, 254, 255), Color.FromArgb(206, 213, 225) }; - private static readonly Color[] _appButtonTrack = { Color.FromArgb(255, 251, 230), - Color.FromArgb(248, 230, 143), - Color.FromArgb(238, 213, 126), - Color.FromArgb(254, 247, 129), + private static readonly Color[] _appButtonTrack = { Color.FromArgb(255, 251, 230), + Color.FromArgb(248, 230, 143), + Color.FromArgb(238, 213, 126), + Color.FromArgb(254, 247, 129), Color.FromArgb(240, 201, 41) }; - private static readonly Color[] _appButtonPressed = { Color.FromArgb(235, 227, 196), - Color.FromArgb(228, 198, 149), - Color.FromArgb(166, 97, 7), - Color.FromArgb(242, 155, 57), + private static readonly Color[] _appButtonPressed = { Color.FromArgb(235, 227, 196), + Color.FromArgb(228, 198, 149), + Color.FromArgb(166, 97, 7), + Color.FromArgb(242, 155, 57), Color.FromArgb(236, 136, 9) }; @@ -2809,7 +2809,7 @@ public override int GetMetricInt(PaletteState state, PaletteMetricInt metric) case PaletteMetricInt.CheckButtonGap: return 5; case PaletteMetricInt.HeaderButtonEdgeInsetForm: - return 4; + return 9; // Needs to be the RealWindowBorderWidth Offset - No idea how to get it at this point case PaletteMetricInt.HeaderButtonEdgeInsetInputControl: return 1; case PaletteMetricInt.HeaderButtonEdgeInsetPrimary: diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteProfessionalSystem.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteProfessionalSystem.cs index 47eef7c60..9d0ac3e83 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteProfessionalSystem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteProfessionalSystem.cs @@ -24,7 +24,7 @@ public class PaletteProfessionalSystem : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(3, 2, 3, 2); private static readonly Padding _contentPaddingHeader3 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, 1, 3, 1); + private static readonly Padding _contentPaddingHeaderForm = new(10, 6, 3, 1); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 2, 3, 2); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonCalendar = new(0); @@ -49,7 +49,7 @@ public class PaletteProfessionalSystem : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0, 0, 0, 0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingBarInside = new(3, 3, 3, 3); private static readonly Padding _metricPaddingBarTabs = new(0, 0, 0, 0); private static readonly Padding _metricPaddingBarOutside = new(0, 0, 0, 3); @@ -2541,7 +2541,7 @@ public override int GetMetricInt(PaletteState state, PaletteMetricInt metric) case PaletteMetricInt.CheckButtonGap: return 5; case PaletteMetricInt.HeaderButtonEdgeInsetForm: - return 4; + return 9; // Needs to be the RealWindowBorderWidth Offset - No idea how to get it at this point case PaletteMetricInt.HeaderButtonEdgeInsetInputControl: return 1; case PaletteMetricInt.HeaderButtonEdgeInsetPrimary: diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteSparkleBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteSparkleBase.cs index 227f83d73..dee543851 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteSparkleBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteSparkleBase.cs @@ -23,7 +23,7 @@ public class PaletteSparkleBase : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(3, 2, 2, 2); private static readonly Padding _contentPaddingHeader3 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, -3, 3, -3); + private static readonly Padding _contentPaddingHeaderForm = new(10, -3, 3, -3); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 1, 3, 1); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonInputControl = new(0); @@ -48,7 +48,7 @@ public class PaletteSparkleBase : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingInputControl = new(0, 1, 0, 1); private static readonly Padding _metricPaddingBarInside = new(3); private static readonly Padding _metricPaddingBarTabs = new(0); @@ -2703,7 +2703,7 @@ public override int GetMetricInt(PaletteState state, PaletteMetricInt metric) case PaletteMetricInt.CheckButtonGap: return 5; case PaletteMetricInt.HeaderButtonEdgeInsetForm: - return 4; + return 9; // Needs to be the RealWindowBorderWidth Offset - No idea how to get it at this point case PaletteMetricInt.HeaderButtonEdgeInsetInputControl: return 1; case PaletteMetricInt.HeaderButtonEdgeInsetPrimary: @@ -3034,8 +3034,8 @@ public override Image GetButtonSpecImage(PaletteButtonSpecStyle style, PaletteState.Tracking => _sparkleHelpHover, _ => _sparkleHelpI }; - - //return state == PaletteState.Disabled ? _sparkleHelpI : _sparkleHelpA; + + //return state == PaletteState.Disabled ? _sparkleHelpI : _sparkleHelpA; case PaletteButtonSpecStyle.Close: return _buttonSpecClose; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteVisualStudioBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteVisualStudioBase.cs index aff87c791..c39d93771 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteVisualStudioBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/PaletteVisualStudioBase.cs @@ -25,7 +25,7 @@ public abstract class PaletteVisualStudioBase : PaletteBase private static readonly Padding _contentPaddingHeader2 = new(2, 1, 2, 1); private static readonly Padding _contentPaddingDock = new(2, 2, 2, 1); private static readonly Padding _contentPaddingCalendar = new(2); - private static readonly Padding _contentPaddingHeaderForm = new(5, 2, 3, 0); + private static readonly Padding _contentPaddingHeaderForm = new(10, 6, 3, 0); // 10 is from the RealWindowFrameSize +1 private static readonly Padding _contentPaddingLabel = new(3, 1, 3, 1); private static readonly Padding _contentPaddingLabel2 = new(8, 2, 8, 2); private static readonly Padding _contentPaddingButtonInputControl = new(0); @@ -49,7 +49,7 @@ public abstract class PaletteVisualStudioBase : PaletteBase private static readonly Padding _metricPaddingRibbon = new(0, 1, 1, 1); private static readonly Padding _metricPaddingRibbonAppButton = new(3, 0, 3, 0); private static readonly Padding _metricPaddingHeader = new(0, 3, 1, 3); - private static readonly Padding _metricPaddingHeaderForm = new(0); + private static readonly Padding _metricPaddingHeaderForm = new(0, 3, 0, -3); // Move the Maximised Form buttons down a bit private static readonly Padding _metricPaddingInputControl = new(0, 1, 0, 1); private static readonly Padding _metricPaddingBarInside = new(3); private static readonly Padding _metricPaddingBarTabs = new(0); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs index 25a9cc302..b65db09e4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs @@ -6066,7 +6066,7 @@ private static int[] AllocatedRowHeights(Size[,] allocation) { for (int col = 0; col < 3; col++) { - // Store the widest cell in each column + // Store the Highest cell in each column if (allocation[col, row].Height > rowHeights[row]) { rowHeights[row] = allocation[col, row].Height;