Changeset 56 for trunk/macosx/NameCell.m
- Timestamp:
- Jan 29, 2006, 7:18:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/NameCell.m
r34 r56 34 34 fSizeString = [NSString stringWithFormat: @" (%@)", 35 35 [NSString stringForFileSize: stat->info.totalSize]]; 36 37 fIcon = [[NSWorkspace sharedWorkspace] iconForFile: 38 [[NSString stringWithUTF8String: stat->folder] 39 stringByAppendingPathComponent: fNameString]]; 40 [fIcon setFlipped: YES]; 41 36 42 fTimeString = @""; 37 43 fPeersString = @""; … … 98 104 99 105 pen = cellFrame.origin; 106 float cellWidth = cellFrame.size.width; 107 108 pen.x += 5; 109 pen.y += 5; 110 [fIcon drawAtPoint: pen fromRect: 111 NSMakeRect(0,0,[fIcon size].width,[fIcon size].height) 112 operation: NSCompositeSourceOver fraction: 1.0]; 100 113 101 114 attributes = [NSMutableDictionary dictionaryWithCapacity: 2]; … … 106 119 forKey: NSFontAttributeName]; 107 120 108 pen.x += 5; pen.y += 5;109 string = [[fNameString stringFittingInWidth: cell Frame.size.width -110 35- [fSizeString sizeWithAttributes: attributes].width121 pen.x += 37; 122 string = [[fNameString stringFittingInWidth: cellWidth - 123 72 - [fSizeString sizeWithAttributes: attributes].width 111 124 withAttributes: attributes] stringByAppendingString: fSizeString]; 112 125 [string drawAtPoint: pen withAttributes: attributes]; … … 120 133 pen.x += 0; pen.y += 15; 121 134 string = [fPeersString stringFittingInWidth: cellFrame.size.width - 122 40withAttributes: attributes];135 77 withAttributes: attributes]; 123 136 [string drawAtPoint: pen withAttributes: attributes]; 124 137
Note: See TracChangeset
for help on using the changeset viewer.