Skip to content

Commit b4121d2

Browse files
committed
icon text value rounding issue fix (ex: show 9.9 instead of 10.0)
1 parent 3afdaca commit b4121d2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

GUI/SensorNotifyIcon.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ private string GetString() {
184184
case SensorType.Level:
185185
return string.Format("{0:F0}", sensor.Value);
186186
case SensorType.Power:
187-
return string.Format(sensor.Value < 10 ? "{0:N1}" : "{0:F0}", sensor.Value);
188187
case SensorType.Data:
189-
return string.Format("{0:F0}", sensor.Value);
188+
return sensor.Value.Value < 10
189+
? string.Format("{0:0.00}", sensor.Value).Substring(0, 3)
190+
: string.Format("{0:F0}", sensor.Value);
190191
case SensorType.Factor:
191192
return string.Format("{0:F1}", sensor.Value);
192193
}

0 commit comments

Comments
 (0)