diff --git a/macosx/English.lproj/InfoWindow.nib/info.nib b/macosx/English.lproj/InfoWindow.nib/info.nib
index 820c0b62e..9076d3f55 100644
--- a/macosx/English.lproj/InfoWindow.nib/info.nib
+++ b/macosx/English.lproj/InfoWindow.nib/info.nib
@@ -7,7 +7,7 @@
IBEditorPositions
549
- 69 306 75 68 0 0 1152 842
+ 364 417 144 49 0 0 1152 842
IBFramework Version
446.1
@@ -21,7 +21,6 @@
IBOpenObjects
- 549
5
IBSystem Version
diff --git a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
index 7920a8ca5..bcfadc871 100644
Binary files a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib and b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib differ
diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m
index a92cd6acf..80ef41059 100644
--- a/macosx/InfoWindowController.m
+++ b/macosx/InfoWindowController.m
@@ -265,7 +265,7 @@
[fStateField setStringValue: [torrent state]];
[fPercentField setStringValue: [NSString stringWithFormat:
- @"%.2f%%", 100 * [torrent progress]]];
+ @"%.2f%%", 100.0 * [torrent progress]]];
int seeders = [torrent seeders], leechers = [torrent leechers];
[fSeedersField setStringValue: seeders < 0 ?
diff --git a/macosx/Torrent.m b/macosx/Torrent.m
index 75614c9c2..d39d737cf 100644
--- a/macosx/Torrent.m
+++ b/macosx/Torrent.m
@@ -153,7 +153,7 @@
[fProgressString setString: @""];
if ([self progress] < 1.0)
[fProgressString appendFormat: @"%@ of %@ (%.2f%%)", [NSString stringForFileSize:
- [self downloadedValid]], [NSString stringForFileSize: [self size]], 100 * [self progress]];
+ [self downloadedValid]], [NSString stringForFileSize: [self size]], 100.0 * [self progress]];
else
[fProgressString appendFormat: @"%@, uploaded %@ (ratio: %@)", [NSString stringForFileSize:
[self size]], [NSString stringForFileSize: [self uploadedTotal]],
diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m
index 522ae3fa4..a419e97db 100644
--- a/macosx/TorrentCell.m
+++ b/macosx/TorrentCell.m
@@ -31,8 +31,8 @@
@interface TorrentCell (Private)
- (void) placeBar: (NSImage *) barImage width: (float) width point: (NSPoint) point;
-- (void) buildSimpleBar: (int) width point: (NSPoint) point;
-- (void) buildAdvancedBar: (int) width point: (NSPoint) point;
+- (void) buildSimpleBar: (float) width point: (NSPoint) point;
+- (void) buildAdvancedBar: (float) width point: (NSPoint) point;
@end
@@ -119,7 +119,7 @@ static uint32_t kRed = 0xFF6450FF, //255, 100, 80
operation: NSCompositeSourceOver];
}
-- (void) buildSimpleBar: (int) width point: (NSPoint) point
+- (void) buildSimpleBar: (float) width point: (NSPoint) point
{
width -= 2.0;
if ([fTorrent isSeeding])
@@ -134,7 +134,7 @@ static uint32_t kRed = 0xFF6450FF, //255, 100, 80
}
else
{
- int completedWidth = [fTorrent progress] * width,
+ float completedWidth = [fTorrent progress] * width,
remainingWidth = width - completedWidth;
BOOL isActive = [fTorrent isActive];
@@ -171,15 +171,17 @@ static uint32_t kRed = 0xFF6450FF, //255, 100, 80
}
}
-- (void) buildAdvancedBar: (int) width point: (NSPoint) point
+- (void) buildAdvancedBar: (float) widthFloat point: (NSPoint) point
{
//if seeding, there's no need for the advanced bar
if ([fTorrent isSeeding])
{
- [self buildSimpleBar: width point: point];
+ [self buildSimpleBar: widthFloat point: point];
return;
}
+ int width = widthFloat; //integers for bars
+
NSBitmapImageRep * bitmap = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes: nil pixelsWide: width
pixelsHigh: BAR_HEIGHT bitsPerSample: 8 samplesPerPixel: 4
@@ -246,19 +248,23 @@ static uint32_t kRed = 0xFF6450FF, //255, 100, 80
//actually draw image
NSImage * img = [[NSImage alloc] initWithSize: [bitmap size]];
[img addRepresentation: bitmap];
+
+ //bar size with float, not double, to match standard bar
+ [img setScalesWhenResized: YES];
+ [img setSize: NSMakeSize(widthFloat, BAR_HEIGHT)];
+
[img compositeToPoint: point operation: NSCompositeSourceOver];
[img release];
[bitmap release];
//draw overlay over advanced bar
- width -= 2.0;
-
[fProgressEndAdvanced compositeToPoint: point operation: NSCompositeSourceOver];
+ widthFloat -= 2.0;
point.x += 1.0;
- [self placeBar: fProgressAdvanced width: width point: point];
+ [self placeBar: fProgressAdvanced width: widthFloat point: point];
- point.x += width;
+ point.x += widthFloat;
[fProgressEndAdvanced compositeToPoint: point operation: NSCompositeSourceOver];
}