Changeset 7568
- Timestamp:
- Jan 2, 2009, 1:10:54 AM (12 years ago)
- Location:
- trunk/macosx
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/BadgeView.h
r7468 r7568 38 38 - (id) initWithFrame: (NSRect) frame lib: (tr_session *) lib; 39 39 40 - ( BOOL) setRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate;40 - (void) displayRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate; 41 41 - (void) setQuitting; 42 42 -
trunk/macosx/BadgeView.m
r7468 r7568 55 55 } 56 56 57 - ( BOOL) setRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate57 - (void) displayRatesWithDownload: (CGFloat) downloadRate upload: (CGFloat) uploadRate 58 58 { 59 59 //only needs update if the badges were displayed or are displayed now 60 60 if (fDownloadRate == downloadRate && fUploadRate == uploadRate) 61 return NO;61 return; 62 62 63 63 fDownloadRate = downloadRate; 64 64 fUploadRate = uploadRate; 65 return YES;65 [self display]; 66 66 } 67 67 -
trunk/macosx/Badger.m
r7508 r7568 57 57 { 58 58 float downloadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeDownloadRate"] 59 ? tr_sessionGetPieceSpeed(fLib, TR_DOWN) : 0.0 f;59 ? tr_sessionGetPieceSpeed(fLib, TR_DOWN) : 0.0; 60 60 float uploadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeUploadRate"] 61 ? tr_sessionGetPieceSpeed(fLib, TR_UP) : 0.0 f;61 ? tr_sessionGetPieceSpeed(fLib, TR_UP) : 0.0; 62 62 63 //only update if the badged values change 64 if ([(BadgeView *)[[NSApp dockTile] contentView] setRatesWithDownload: downloadRate upload: uploadRate]) 65 [[NSApp dockTile] display]; 63 [(BadgeView *)[[NSApp dockTile] contentView] displayRatesWithDownload: downloadRate upload: uploadRate]; 66 64 } 67 65 -
trunk/macosx/FileNameCell.m
r7114 r7568 140 140 [[self image] drawInRect: [self imageRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; 141 141 142 NSColor * titleColor, * statusColor; 143 if ([self backgroundStyle] == NSBackgroundStyleDark) 144 titleColor = statusColor = [NSColor whiteColor]; 145 else if ([[(FileOutlineView *)[self controlView] torrent] checkForFiles: [(FileListNode *)[self objectValue] indexes]] == NSOffState) 146 titleColor = statusColor = [NSColor disabledControlTextColor]; 147 else 148 { 149 titleColor = [NSColor controlTextColor]; 150 statusColor = [NSColor darkGrayColor]; 151 } 152 142 153 //title 143 NSColor * specialColor = nil; 144 if ([self isHighlighted] 145 && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]]) 146 specialColor = [NSColor whiteColor]; 147 else if ([[(FileOutlineView *)[self controlView] torrent] checkForFiles: [(FileListNode *)[self objectValue] indexes]] == NSOffState) 148 specialColor = [NSColor disabledControlTextColor]; 149 else; 150 151 NSAttributedString * titleString = [self attributedTitleWithColor: specialColor ? specialColor : [NSColor controlTextColor]]; 154 NSAttributedString * titleString = [self attributedTitleWithColor: titleColor]; 152 155 NSRect titleRect = [self rectForTitleWithString: titleString inBounds: cellFrame]; 153 156 [titleString drawInRect: titleRect]; 154 157 155 158 //status 156 NSAttributedString * statusString = [self attributedStatusWithColor: s pecialColor ? specialColor : [NSColor darkGrayColor]];159 NSAttributedString * statusString = [self attributedStatusWithColor: statusColor]; 157 160 NSRect statusRect = [self rectForStatusWithString: statusString withTitleRect: titleRect inBounds: cellFrame]; 158 161 [statusString drawInRect: statusRect]; -
trunk/macosx/GroupsController.m
r7520 r7568 367 367 return row; 368 368 } 369 return -1; // Default to no group369 return -1; 370 370 } 371 371 -
trunk/macosx/TorrentCell.m
r7508 r7568 433 433 //text color 434 434 NSColor * titleColor, * statusColor; 435 if ([self isHighlighted] 436 && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]]) 435 if ([self backgroundStyle] == NSBackgroundStyleDark) 437 436 { 438 437 titleColor = [NSColor whiteColor];
Note: See TracChangeset
for help on using the changeset viewer.