Skip to content

Commit

Permalink
Fix device details unreadable on Windows 11
Browse files Browse the repository at this point in the history
  • Loading branch information
davkean committed Nov 12, 2021
1 parent 273f507 commit 4f97dae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
base.OnRenderItemText(new ToolStripItemTextRenderEventArgs(e.Graphics, e.Item, string.Concat(text[0], Environment.NewLine, Environment.NewLine), e.TextRectangle, e.TextColor, e.TextFont, e.TextFormat));

// Then render, the bottom two lines in gray text
TextRenderer.DrawText(e.Graphics, string.Concat(Environment.NewLine, text[1], Environment.NewLine, text[2]), e.TextFont, e.TextRectangle, SystemColors.GrayText, e.TextFormat);
TextRenderer.DrawText(e.Graphics, string.Concat(Environment.NewLine, text[1], Environment.NewLine, text[2]), e.TextFont, e.TextRectangle, e.Item.Selected ? SystemColors.HighlightText : SystemColors.GrayText, e.TextFormat);
}

protected override Rectangle GetBackgroundRectangle(ToolStripItem item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ private bool IsRenderingImageCheck(ToolStripItem item)
if (!(item is ToolStripMenuItem menuItem))
return false;


return (menuItem.Owner is ToolStripDropDownMenu menu && !menu.ShowCheckMargin && menuItem.Image != null);
}

Expand Down

0 comments on commit 4f97dae

Please sign in to comment.