mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
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
2 changed files with 5 additions and 3 deletions
BIN
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -34,11 +34,13 @@
|
|||
|
||||
+ (NSString *) stringForSpeedAbbrev: (float) speed
|
||||
{
|
||||
if (speed < 1024)
|
||||
if (speed < 1000) /* 0.0 K to 999.9 K */
|
||||
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];
|
||||
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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue