Skip to content

Commit 312455d

Browse files
author
Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box)
committed
Addresses feedback
1 parent 98ec7f7 commit 312455d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStripRenderer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,7 @@ protected virtual void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
865865

866866
if (image is Bitmap bitmap)
867867
{
868-
if (Application.IsDarkModeEnabled)
869-
{
870-
// In dark mode, the check mark icons are dark glyphs designed for light
871-
// backgrounds. Invert the foreground color so they are visible on dark backgrounds.
872-
image = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor);
873-
}
874-
else if (SystemInformation.HighContrast)
868+
if (SystemInformation.HighContrast)
875869
{
876870
Color backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.BackColor;
877871

@@ -880,6 +874,12 @@ protected virtual void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
880874
image = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor);
881875
}
882876
}
877+
else if (Application.IsDarkModeEnabled)
878+
{
879+
// In dark mode, the check mark icons are dark glyphs designed for light
880+
// backgrounds. Invert the foreground color so they are visible on dark backgrounds.
881+
image = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor);
882+
}
883883
}
884884
}
885885

0 commit comments

Comments
 (0)