Skip to content

Commit b6435ad

Browse files
committed
cleanup
1 parent b61df51 commit b6435ad

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/WinUIEx/Messaging/Message.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public override string ToString()
6868
default:
6969
break;
7070
}
71-
return $"{(WindowsMessages)MessageId}: LParam=0x{LParam.ToString("x2")} WParam=0x{WParam.ToString("x2")}";
71+
return $"{(WindowsMessages)MessageId}: LParam=0x{LParam.ToString("x")} WParam=0x{WParam.ToString("x")}";
7272
}
7373
}
7474
}

src/WinUIEx/TrayIcon.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,9 @@ private static uint CreateIconData(HICON hicon, string? tooltip, uint callbackId
341341
tip = new __ushort_128();
342342
if (!string.IsNullOrEmpty(tooltip))
343343
{
344-
if (!string.IsNullOrEmpty(tooltip))
344+
for (int i = 0; i < 128 && i < tooltip.Length; i++)
345345
{
346-
for (int i = 0; i < 128 && i < tooltip.Length; i++)
347-
{
348-
tip[i] = (ushort)tooltip[i];
349-
}
346+
tip[i] = (ushort)tooltip[i];
350347
}
351348
flags = flags | NIF_TIP | NIF_SHOWTIP;
352349
}

0 commit comments

Comments
 (0)