Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ internal void PaintText(Graphics g)
{
Font font = Font;
Color textColor = ForeColor;
Rectangle textRect = InternalLayout.TextRectangle;
if (IsLink)
{
LinkUtilities.EnsureLinkFonts(font, LinkBehavior, ref _linkFont, ref _hoverLinkFont);
Expand All @@ -359,11 +360,19 @@ internal void PaintText(Graphics g)
{
font = _hoverLinkFont;
textColor = ActiveLinkColor;
if (DisplayInformation.HighContrast)
{
g.FillRectangle(SystemBrushes.Highlight, textRect);
}
}
else if (Selected)
{
font = _hoverLinkFont;
textColor = (LinkVisited) ? VisitedLinkColor : LinkColor;
if (DisplayInformation.HighContrast)
{
g.FillRectangle(SystemBrushes.Highlight, textRect);
}
}
else
{
Expand All @@ -372,7 +381,6 @@ internal void PaintText(Graphics g)
}
}

Rectangle textRect = InternalLayout.TextRectangle;
renderer.DrawItemText(new ToolStripItemTextRenderEventArgs(g, this, Text, textRect, textColor, font, InternalLayout.TextFormat));
}
}
Expand Down
Loading