File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ namespace ArkaneSystems.MouseJiggler;
2020
2121public partial class MainForm : Form
2222{
23+ private const int MaxNotifyIconTextLength = 63 ;
24+
2325 /// <summary>
2426 /// Constructor for use by the form designer.
2527 /// </summary>
@@ -94,7 +96,8 @@ private void UpdateNotificationAreaText ()
9496 {
9597 var mode = this . JiggleMode . ToString ( ) ;
9698 var rnd = this . RandomTimer ? $@ " with random variation," : string . Empty ;
97- this . niTray . Text = $@ "Jiggling mouse every { this . JigglePeriod } s,{ rnd } mode: { mode } (Δ { this . JiggleDistance } ).";
99+ var text = $@ "Jiggling mouse every { this . JigglePeriod } s,{ rnd } mode: { mode } (Δ { this . JiggleDistance } ).";
100+ this . niTray . Text = text . Length > MaxNotifyIconTextLength ? text [ ..( MaxNotifyIconTextLength - 3 ) ] + "..." : text ;
98101 }
99102 }
100103
You can’t perform that action at this time.
0 commit comments