From 1155c205531b8fc045cf9a6a6445564caad6b3f2 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 4 Oct 2006 20:07:36 +0000 Subject: [PATCH] Faster scrolling at the cost of a bit less detailed advanced bar (if you want more details, use the info window ;)) --- macosx/PiecesView.m | 5 +++-- macosx/Torrent.m | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/macosx/PiecesView.m b/macosx/PiecesView.m index 75fb66fd7..f9248727f 100644 --- a/macosx/PiecesView.m +++ b/macosx/PiecesView.m @@ -142,8 +142,9 @@ else fAcross = MAX_ACROSS; - fWidth = ([fImageView bounds].size.width - (fAcross + 1) * BETWEEN) / fAcross; - fExtraBorder = ([fImageView bounds].size.width - ((fWidth + BETWEEN) * fAcross + BETWEEN)) / 2; + float width = [fImageView bounds].size.width; + fWidth = (width - (fAcross + 1) * BETWEEN) / fAcross; + fExtraBorder = (width - ((fWidth + BETWEEN) * fAcross + BETWEEN)) / 2; [self updateView: YES]; } diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 1bfab764c..198f3d54e 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -827,7 +827,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 - (NSImage *) advancedBar { - int width = 324; //integers for bars + int width = 225; //amount of pixels/"pieces" NSBitmapImageRep * bitmap = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes: nil pixelsWide: width pixelsHigh: BAR_HEIGHT bitsPerSample: 8 samplesPerPixel: 4 hasAlpha: YES