Skip to content

Commit 2e7e900

Browse files
Epica3055LeafShi1
authored andcommitted
fix #13677 FontStyle.Bold Not Visually Applied to LinkLabel at Runtime via Code
1 parent 939d6e0 commit 2e7e900

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/System.Windows.Forms/src/System/Windows/Forms/LinkUtilities.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static void EnsureLinkFonts(
162162
LinkBehavior link,
163163
[AllowNull] ref Font linkFont,
164164
[AllowNull] ref Font hoverLinkFont,
165-
bool isActive = false)
165+
bool? isActive = null)
166166
{
167167
if (linkFont is not null && hoverLinkFont is not null)
168168
{
@@ -209,11 +209,11 @@ public static void EnsureLinkFonts(
209209
style &= ~FontStyle.Underline;
210210
}
211211

212-
if (isActive)
212+
if (isActive is not null and true)
213213
{
214214
style |= FontStyle.Bold;
215215
}
216-
else
216+
else if (isActive is not null and false)
217217
{
218218
style &= ~FontStyle.Bold;
219219
}

0 commit comments

Comments
 (0)