Changeset 340
- Timestamp:
- Jun 12, 2006, 3:26:24 PM (17 years ago)
- Location:
- trunk/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TorrentCell.m
r315 r340 24 24 25 25 #import "TorrentCell.h" 26 #import "TorrentTableView.h" 26 27 #import "StringAdditions.h" 27 28 … … 270 271 pen.y += [progressString size].height + linePadding; 271 272 272 float barWidth = mainWidth + extraNameShift - 42.0+ padding;273 float barWidth = mainWidth + extraNameShift - BUTTONS_TOTAL_WIDTH + padding; 273 274 274 275 NSBitmapImageRep * bitmap = [[NSBitmapImageRep alloc] -
trunk/macosx/TorrentTableView.h
r272 r340 26 26 #import <transmission.h> 27 27 28 #define BUTTONS_TOTAL_WIDTH 42.0 29 28 30 @class Controller; 29 31 -
trunk/macosx/TorrentTableView.m
r339 r340 30 30 #define BUTTON_WIDTH 14.0 31 31 #define BUTTON_TO_TOP 33.5 32 #define DISTANCE_FROM_CENTER 2.5 33 //change BUTTONS_TOTAL_WIDTH when changing this 32 34 #define AREA_CENTER 21.0 33 #define DISTANCE_FROM_CENTER 2.534 35 35 36 @interface TorrentTableView (Private) … … 39 40 - (BOOL) pointInPauseRect: (NSPoint) point; 40 41 - (BOOL) pointInRevealRect: (NSPoint) point; 42 - (BOOL) pointInIconRect: (NSPoint) point; 41 43 42 44 @end … … 97 99 else if( sameRow && [self pointInRevealRect: point] 98 100 && [self pointInRevealRect: fClickPoint] ) 99 { 100 torrent = [fTorrents objectAtIndex: row]; 101 [torrent reveal]; 102 } 101 [[fTorrents objectAtIndex: row] reveal]; 103 102 else 104 103 if ([e clickCount] == 2) 105 [fController showInfo: nil]; 104 { 105 if ([self pointInIconRect: point]) 106 [[fTorrents objectAtIndex: row] reveal]; 107 else 108 [fController showInfo: nil]; 109 } 106 110 107 111 [super mouseUp: e]; … … 206 210 } 207 211 212 - (BOOL) pointInIconRect: (NSPoint) point 213 { 214 int row = [self rowAtPoint: point]; 215 NSRect cellRect = [self frameOfCellAtColumn: 216 [self columnWithIdentifier: @"Torrent"] row: row]; 217 NSSize iconSize = [[[fTorrents objectAtIndex: row] iconFlipped] size]; 218 219 NSRect iconRect = NSMakeRect(cellRect.origin.x + 3.0, cellRect.origin.y 220 + (cellRect.size.height - iconSize.height) * 0.5, 221 iconSize.width, iconSize.height); 222 223 return NSPointInRect(point, iconRect); 224 } 225 208 226 - (BOOL) pointInPauseRect: (NSPoint) point 209 227 {
Note: See TracChangeset
for help on using the changeset viewer.