File tree Expand file tree Collapse file tree
src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments