Reverted the bottom of the window to the way it was before.
Minor change to stringForSpeedAbbrev so it never shows more than four digits (-> no overlapping possible in the window or the badge).
This commit is contained in:
parent
17a053d881
commit
95019c0246
Binary file not shown.
|
@ -34,11 +34,13 @@
|
||||||
|
|
||||||
+ (NSString *) stringForSpeedAbbrev: (float) speed
|
+ (NSString *) stringForSpeedAbbrev: (float) speed
|
||||||
{
|
{
|
||||||
if (speed < 1024)
|
if (speed < 1000) /* 0.0 K to 999.9 K */
|
||||||
return [NSString stringWithFormat: @"%.1f K", speed];
|
return [NSString stringWithFormat: @"%.1f K", speed];
|
||||||
else if (speed < 1048576)
|
else if (speed < 102400) /* 0.98 M to 99.99 M */
|
||||||
return [NSString stringWithFormat: @"%.2f M", speed / 1024];
|
return [NSString stringWithFormat: @"%.2f M", speed / 1024];
|
||||||
else
|
else if (speed < 1024000) /* 100.0 M to 999.9 M */
|
||||||
|
return [NSString stringWithFormat: @"%.1f M", speed / 1024];
|
||||||
|
else /* Insane speeds */
|
||||||
return [NSString stringWithFormat: @"%.2f G", speed / 1048576];
|
return [NSString stringWithFormat: @"%.2f G", speed / 1048576];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue