trivial changes to table grid color drawing and other areas

This commit is contained in:
Mitchell Livingston 2008-11-08 22:13:00 +00:00
parent 9917e924ba
commit 239fc6610b
5 changed files with 30 additions and 31 deletions

View File

@ -57,14 +57,12 @@
- (BOOL) setRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate
{
//only needs update if the badges were displayed or are displayed now
BOOL needsUpdate = fDownloadRate != downloadRate || fUploadRate != uploadRate;
if (needsUpdate)
{
fDownloadRate = downloadRate;
fUploadRate = uploadRate;
}
if (fDownloadRate == downloadRate && fUploadRate == uploadRate)
return NO;
return needsUpdate;
fDownloadRate = downloadRate;
fUploadRate = uploadRate;
return YES;
}
- (void) setQuitting

View File

@ -96,9 +96,9 @@
return;
}
else if (fQuittingTiger)
if (fQuittingTiger)
return;
else;
//set completed badge to top right
BOOL completedChange = fCompleted != fCompletedBadged;

View File

@ -4229,7 +4229,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSEnumerator * enumerator = [fTorrents objectEnumerator];
while ((torrent = [enumerator nextObject]))
if (torrentStruct == [torrent torrentStruct])
{
[torrent retain];
break;
}
if (!torrent)
{
@ -4238,8 +4241,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSLog(@"No torrent found matching the given torrent struct from the RPC callback!");
return;
}
[torrent retain];
}
switch (type)

View File

@ -738,19 +738,19 @@
visibleRect.size.height -= newY - visibleRect.origin.y;
visibleRect.origin.y = newY;
}
//remaining visible rows continue alternating
CGFloat height = [self rowHeight] + [self intercellSpacing].height;
NSInteger numberOfRects = ceil(visibleRect.size.height / height);
visibleRect.size.height = height;
for (NSInteger i=0; i<numberOfRects; i++)
{
if (!start)
NSRectFill(visibleRect);
start = !start;
//remaining visible rows continue alternating
const CGFloat height = [self rowHeight] + [self intercellSpacing].height;
const NSInteger numberOfRects = ceil(visibleRect.size.height / height);
visibleRect.size.height = height;
if (start)
visibleRect.origin.y += height;
for (NSInteger i = start ? 1 : 0; i<numberOfRects; i += 2)
{
NSRectFill(visibleRect);
visibleRect.origin.y += 2 * height;
}
[super highlightSelectionInClipRect: clipRect];

View File

@ -86,17 +86,17 @@
}
//remaining visible rows continue alternating
CGFloat height = [self rowHeight] + [self intercellSpacing].height;
NSInteger numberOfRects = ceil(visibleRect.size.height / height);
visibleRect.size.height = height;
const CGFloat height = [self rowHeight] + [self intercellSpacing].height;
const NSInteger numberOfRects = ceil(visibleRect.size.height / height);
for (NSInteger i=0; i<numberOfRects; i++)
{
if (!start)
NSRectFill(visibleRect);
start = !start;
visibleRect.size.height = height;
if (start)
visibleRect.origin.y += height;
for (NSInteger i = start ? 1 : 0; i<numberOfRects; i += 2)
{
NSRectFill(visibleRect);
visibleRect.origin.y += 2 * height;
}
[super highlightSelectionInClipRect: clipRect];