Skip to content

Commit 343d383

Browse files
committed
Office 2013 & Microsoft 365 control box items are not 'flat' (V85 LTS)
# Fix Office 2013 & Microsoft 365 control box items not flat (#972) ## Summary Control box buttons (minimize, maximize, close) in Office 2013 and Microsoft 365 themes now use flat, solid fills instead of gradients, matching the official Office 2013 appearance. White themes use updated tracking and pressed colors for consistent feedback. ## Problem Office 2013 and Microsoft 365 control box items used `PaletteColorStyle.Linear` and `PaletteColorStyle.LinearShadow`, which created gradients and made them appear raised instead of flat like the official Office 2013 control box. ## Solution 1. **Flat appearance:** Updated `GetBackColorStyle` for `ButtonForm` and `ButtonFormClose` to use `PaletteColorStyle.Solid` for all states instead of `Linear` and `LinearShadow`. 2. **White theme tracking color:** Set `FormButtonBack1Track` and `FormButtonBack2Track` to RGB(213, 224, 241) for white themes. 3. **White theme pressed color:** Set `FormButtonBack1Pressed` and `FormButtonBack2Pressed` to RGB(163, 189, 227) for white themes. ## Files Changed ### Palette color style (flat appearance) | Location | Files | |----------|-------| | Office 2013 | `PaletteOffice2013Base.cs`, `PaletteOffice2013White.cs` | | Microsoft 365 | `PaletteMicrosoft365Base.cs`, `PaletteMicrosoft365Black.cs`, `PaletteMicrosoft365SilverLightMode.cs`, `PaletteMicrosoft365SilverDarkMode.cs`, `PaletteMicrosoft365BlueLightMode.cs`, `PaletteMicrosoft365BlueDarkMode.cs`, `PaletteMicrosoft365BlackDarkMode.cs` | | Visual Studio | `PaletteVisualStudio2010With365Base.cs`, `PaletteVisualStudio2010With2013Base.cs` | ### White theme colors (tracking & pressed) | Location | Files | |----------|-------| | Office 2013 | `PaletteOffice2013White.cs`, `PaletteOffice2013LightGray.cs` | | Microsoft 365 | `PaletteMicrosoft365White.cs`, `PaletteMicrosoft365Silver.cs`, `PaletteMicrosoft365SilverLightMode.cs`, `PaletteMicrosoft365BlueLightMode.cs` | ### Documentation | Location | File | |----------|------| | Changelog | `Documents\Help\Changelog.md` | ## Testing - Run TestForm with Office 2013 or Microsoft 365 themes - Verify control box buttons appear flat (no gradient) - Hover (tracking): white themes should show RGB(213, 224, 241) - Press: white themes should show RGB(163, 189, 227) ## Links - Closes #972
1 parent b343d09 commit 343d383

File tree

15 files changed

+94
-104
lines changed

15 files changed

+94
-104
lines changed

Documents/Help/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# 2026-02-23 - Build 2602 (Patch 10) - February 2025
66

7+
* Resolved [#972](https://github.com/Krypton-Suite/Standard-Toolkit/issues/972), `Office 2013` & `Microsoft 365` control box items are not 'flat' – control box buttons (minimize, maximize, close) now use solid flat fills instead of gradients to match the official Office 2013 appearance
78
* Resolved [#2913](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2913), Krypton Toolkit causes low-quality text rendering in Stimulsoft preview window
89
* Resolved [#2935](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2935), Maximized MDI window form border drawn on wrong monitor (secondary monitor); `DropSolidWindow` now uses screen coordinates for `DesktopBounds`; non-client border painting uses a DC compatible with the window's monitor
910
* Resolved [#2745](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2745b), `VisualMultilineStringEditorForm` only saving last line

Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region BSD License
1+
#region BSD License
22
/*
33
*
44
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
@@ -964,12 +964,11 @@ or PaletteBackStyle.GridBackgroundCustom3
964964
PaletteBackStyle.SeparatorHighProfile => PaletteColorStyle.RoundedTopLight,
965965
PaletteBackStyle.SeparatorHighInternalProfile => PaletteColorStyle.Linear,
966966
PaletteBackStyle.HeaderPrimary or PaletteBackStyle.HeaderDockInactive or PaletteBackStyle.HeaderSecondary or PaletteBackStyle.HeaderCustom1 or PaletteBackStyle.HeaderCustom2 or PaletteBackStyle.HeaderCustom3 or PaletteBackStyle.HeaderDockActive => PaletteColorStyle.Rounded,
967-
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
968-
{
969-
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking => PaletteColorStyle.Linear,
970-
PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.LinearShadow,
971-
_ => throw new ArgumentOutOfRangeException(nameof(state))
972-
},
967+
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
968+
{
969+
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking or PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.Solid,
970+
_ => throw new ArgumentOutOfRangeException(nameof(state))
971+
},
973972
PaletteBackStyle.ButtonAlternate or PaletteBackStyle.ButtonStandalone or PaletteBackStyle.ButtonLowProfile or PaletteBackStyle.ButtonBreadCrumb or PaletteBackStyle.ButtonListItem or PaletteBackStyle.ButtonCommand or PaletteBackStyle.ButtonButtonSpec or PaletteBackStyle.ButtonCluster or PaletteBackStyle.ButtonGallery or PaletteBackStyle.ButtonCustom1 or PaletteBackStyle.ButtonCustom2 or PaletteBackStyle.ButtonCustom3 or PaletteBackStyle.ButtonInputControl or PaletteBackStyle.ContextMenuItemHighlight => state switch
974973
{
975974
PaletteState.Disabled => PaletteColorStyle.Solid,

Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region BSD License
1+
#region BSD License
22
/*
33
*
44
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
@@ -1543,12 +1543,11 @@ or PaletteBackStyle.GridBackgroundCustom3
15431543
PaletteBackStyle.SeparatorHighProfile => PaletteColorStyle.RoundedTopLight,
15441544
PaletteBackStyle.SeparatorHighInternalProfile => PaletteColorStyle.Linear,
15451545
PaletteBackStyle.HeaderPrimary or PaletteBackStyle.HeaderDockInactive or PaletteBackStyle.HeaderSecondary or PaletteBackStyle.HeaderCustom1 or PaletteBackStyle.HeaderCustom2 or PaletteBackStyle.HeaderCustom3 or PaletteBackStyle.HeaderDockActive => PaletteColorStyle.Rounded,
1546-
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1547-
{
1548-
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking => PaletteColorStyle.Linear,
1549-
PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.LinearShadow,
1550-
_ => throw new ArgumentOutOfRangeException(nameof(state))
1551-
},
1546+
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1547+
{
1548+
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking or PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.Solid,
1549+
_ => throw new ArgumentOutOfRangeException(nameof(state))
1550+
},
15521551
PaletteBackStyle.ButtonAlternate or PaletteBackStyle.ButtonStandalone or PaletteBackStyle.ButtonLowProfile or PaletteBackStyle.ButtonBreadCrumb or PaletteBackStyle.ButtonListItem or PaletteBackStyle.ButtonCommand or PaletteBackStyle.ButtonButtonSpec or PaletteBackStyle.ButtonCluster or PaletteBackStyle.ButtonGallery or PaletteBackStyle.ButtonCustom1 or PaletteBackStyle.ButtonCustom2 or PaletteBackStyle.ButtonCustom3 or PaletteBackStyle.ButtonInputControl or PaletteBackStyle.ContextMenuItemHighlight => state switch
15531552
{
15541553
PaletteState.Disabled => PaletteColorStyle.Solid,

Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region BSD License
1+
#region BSD License
22
/*
33
*
44
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
@@ -1543,12 +1543,11 @@ or PaletteBackStyle.GridBackgroundCustom3
15431543
PaletteBackStyle.SeparatorHighProfile => PaletteColorStyle.RoundedTopLight,
15441544
PaletteBackStyle.SeparatorHighInternalProfile => PaletteColorStyle.Linear,
15451545
PaletteBackStyle.HeaderPrimary or PaletteBackStyle.HeaderDockInactive or PaletteBackStyle.HeaderSecondary or PaletteBackStyle.HeaderCustom1 or PaletteBackStyle.HeaderCustom2 or PaletteBackStyle.HeaderCustom3 or PaletteBackStyle.HeaderDockActive => PaletteColorStyle.Rounded,
1546-
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1547-
{
1548-
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking => PaletteColorStyle.Linear,
1549-
PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.LinearShadow,
1550-
_ => throw new ArgumentOutOfRangeException(nameof(state))
1551-
},
1546+
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1547+
{
1548+
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking or PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.Solid,
1549+
_ => throw new ArgumentOutOfRangeException(nameof(state))
1550+
},
15521551
PaletteBackStyle.ButtonAlternate or PaletteBackStyle.ButtonStandalone or PaletteBackStyle.ButtonLowProfile or PaletteBackStyle.ButtonBreadCrumb or PaletteBackStyle.ButtonListItem or PaletteBackStyle.ButtonCommand or PaletteBackStyle.ButtonButtonSpec or PaletteBackStyle.ButtonCluster or PaletteBackStyle.ButtonGallery or PaletteBackStyle.ButtonCustom1 or PaletteBackStyle.ButtonCustom2 or PaletteBackStyle.ButtonCustom3 or PaletteBackStyle.ButtonInputControl or PaletteBackStyle.ContextMenuItemHighlight => state switch
15531552
{
15541553
PaletteState.Disabled => PaletteColorStyle.Solid,

Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region BSD License
1+
#region BSD License
22
/*
33
*
44
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
@@ -183,11 +183,11 @@ public class PaletteMicrosoft365BlueLightMode : PaletteMicrosoft365BlueLightMode
183183
Color.FromArgb(105, 112, 121), // FormHeaderLongActive
184184
Color.FromArgb(160, 160, 160), // FormHeaderLongInactive
185185
Color.FromArgb(158, 193, 241), // FormButtonBorderTrack
186-
Color.FromArgb(210, 228, 254), // FormButtonBack1Track
187-
Color.FromArgb(255, 255, 255), // FormButtonBack2Track
186+
Color.FromArgb(213, 224, 241), // FormButtonBack1Track
187+
Color.FromArgb(213, 224, 241), // FormButtonBack2Track
188188
Color.FromArgb(162, 191, 227), // FormButtonBorderPressed
189-
Color.FromArgb(132, 178, 233), // FormButtonBack1Pressed
190-
Color.FromArgb(192, 231, 252), // FormButtonBack2Pressed
189+
Color.FromArgb(163, 189, 227), // FormButtonBack1Pressed
190+
Color.FromArgb(163, 189, 227), // FormButtonBack2Pressed
191191
Color.FromArgb( 21, 66, 139), // TextButtonFormNormal
192192
Color.FromArgb( 21, 66, 139), // TextButtonFormTracking
193193
Color.FromArgb( 21, 66, 139), // TextButtonFormPressed
@@ -1547,12 +1547,11 @@ or PaletteBackStyle.GridBackgroundCustom3
15471547
PaletteBackStyle.SeparatorHighProfile => PaletteColorStyle.RoundedTopLight,
15481548
PaletteBackStyle.SeparatorHighInternalProfile => PaletteColorStyle.Linear,
15491549
PaletteBackStyle.HeaderPrimary or PaletteBackStyle.HeaderDockInactive or PaletteBackStyle.HeaderSecondary or PaletteBackStyle.HeaderCustom1 or PaletteBackStyle.HeaderCustom2 or PaletteBackStyle.HeaderCustom3 or PaletteBackStyle.HeaderDockActive => PaletteColorStyle.Rounded,
1550-
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1551-
{
1552-
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking => PaletteColorStyle.Linear,
1553-
PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.LinearShadow,
1554-
_ => throw new ArgumentOutOfRangeException(nameof(state))
1555-
},
1550+
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1551+
{
1552+
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking or PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.Solid,
1553+
_ => throw new ArgumentOutOfRangeException(nameof(state))
1554+
},
15561555
PaletteBackStyle.ButtonAlternate or PaletteBackStyle.ButtonStandalone or PaletteBackStyle.ButtonLowProfile or PaletteBackStyle.ButtonBreadCrumb or PaletteBackStyle.ButtonListItem or PaletteBackStyle.ButtonCommand or PaletteBackStyle.ButtonButtonSpec or PaletteBackStyle.ButtonCluster or PaletteBackStyle.ButtonGallery or PaletteBackStyle.ButtonCustom1 or PaletteBackStyle.ButtonCustom2 or PaletteBackStyle.ButtonCustom3 or PaletteBackStyle.ButtonInputControl or PaletteBackStyle.ContextMenuItemHighlight => state switch
15571556
{
15581557
PaletteState.Disabled => PaletteColorStyle.Solid,

Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region BSD License
1+
#region BSD License
22
/*
33
*
44
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
@@ -1548,12 +1548,11 @@ or PaletteBackStyle.GridBackgroundCustom3
15481548
PaletteBackStyle.SeparatorHighProfile => PaletteColorStyle.RoundedTopLight,
15491549
PaletteBackStyle.SeparatorHighInternalProfile => PaletteColorStyle.Linear,
15501550
PaletteBackStyle.HeaderPrimary or PaletteBackStyle.HeaderDockInactive or PaletteBackStyle.HeaderSecondary or PaletteBackStyle.HeaderCustom1 or PaletteBackStyle.HeaderCustom2 or PaletteBackStyle.HeaderCustom3 or PaletteBackStyle.HeaderDockActive => PaletteColorStyle.Rounded,
1551-
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1552-
{
1553-
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking => PaletteColorStyle.Linear,
1554-
PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.LinearShadow,
1555-
_ => throw new ArgumentOutOfRangeException(nameof(state))
1556-
},
1551+
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1552+
{
1553+
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking or PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.Solid,
1554+
_ => throw new ArgumentOutOfRangeException(nameof(state))
1555+
},
15571556
PaletteBackStyle.ButtonAlternate or PaletteBackStyle.ButtonStandalone or PaletteBackStyle.ButtonLowProfile or PaletteBackStyle.ButtonBreadCrumb or PaletteBackStyle.ButtonListItem or PaletteBackStyle.ButtonCommand or PaletteBackStyle.ButtonButtonSpec or PaletteBackStyle.ButtonCluster or PaletteBackStyle.ButtonGallery or PaletteBackStyle.ButtonCustom1 or PaletteBackStyle.ButtonCustom2 or PaletteBackStyle.ButtonCustom3 or PaletteBackStyle.ButtonInputControl or PaletteBackStyle.ContextMenuItemHighlight => state switch
15581557
{
15591558
PaletteState.Disabled => PaletteColorStyle.Solid,

Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region BSD License
1+
#region BSD License
22
/*
33
*
44
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
@@ -186,11 +186,11 @@ public class PaletteMicrosoft365SilverLightMode : PaletteMicrosoft365SilverLight
186186
Color.FromArgb(92, 98, 106), // FormHeaderLongActive
187187
Color.FromArgb(138, 138, 138), // FormHeaderLongInactive
188188
Color.FromArgb(189, 199, 212), // FormButtonBorderTrack
189-
Color.FromArgb(222, 230, 242), // FormButtonBack1Track
190-
Color.FromArgb(255, 255, 255), // FormButtonBack2Track
189+
Color.FromArgb(213, 224, 241), // FormButtonBack1Track
190+
Color.FromArgb(213, 224, 241), // FormButtonBack2Track
191191
Color.FromArgb(149, 154, 160), // FormButtonBorderPressed
192-
Color.FromArgb(125, 131, 140), // FormButtonBack1Pressed
193-
Color.FromArgb(213, 226, 233), // FormButtonBack2Pressed
192+
Color.FromArgb(163, 189, 227), // FormButtonBack1Pressed
193+
Color.FromArgb(163, 189, 227), // FormButtonBack2Pressed
194194
Color.Black, // TextButtonFormNormal
195195
Color.Black, // TextButtonFormTracking
196196
Color.Black, // TextButtonFormPressed
@@ -1552,12 +1552,11 @@ or PaletteBackStyle.GridBackgroundCustom3
15521552
PaletteBackStyle.SeparatorHighProfile => PaletteColorStyle.RoundedTopLight,
15531553
PaletteBackStyle.SeparatorHighInternalProfile => PaletteColorStyle.Linear,
15541554
PaletteBackStyle.HeaderPrimary or PaletteBackStyle.HeaderDockInactive or PaletteBackStyle.HeaderSecondary or PaletteBackStyle.HeaderCustom1 or PaletteBackStyle.HeaderCustom2 or PaletteBackStyle.HeaderCustom3 or PaletteBackStyle.HeaderDockActive => PaletteColorStyle.Rounded,
1555-
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1556-
{
1557-
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking => PaletteColorStyle.Linear,
1558-
PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.LinearShadow,
1559-
_ => throw new ArgumentOutOfRangeException(nameof(state))
1560-
},
1555+
PaletteBackStyle.ButtonForm or PaletteBackStyle.ButtonFormClose => state switch
1556+
{
1557+
PaletteState.Disabled or PaletteState.Normal or PaletteState.NormalDefaultOverride or PaletteState.CheckedNormal or PaletteState.Tracking or PaletteState.CheckedTracking or PaletteState.Pressed or PaletteState.CheckedPressed => PaletteColorStyle.Solid,
1558+
_ => throw new ArgumentOutOfRangeException(nameof(state))
1559+
},
15611560
PaletteBackStyle.ButtonAlternate or PaletteBackStyle.ButtonStandalone or PaletteBackStyle.ButtonLowProfile or PaletteBackStyle.ButtonBreadCrumb or PaletteBackStyle.ButtonListItem or PaletteBackStyle.ButtonCommand or PaletteBackStyle.ButtonButtonSpec or PaletteBackStyle.ButtonCluster or PaletteBackStyle.ButtonGallery or PaletteBackStyle.ButtonCustom1 or PaletteBackStyle.ButtonCustom2 or PaletteBackStyle.ButtonCustom3 or PaletteBackStyle.ButtonInputControl or PaletteBackStyle.ContextMenuItemHighlight => state switch
15621561
{
15631562
PaletteState.Disabled => PaletteColorStyle.Solid,

0 commit comments

Comments
 (0)