Changeset 6269


Ignore:
Timestamp:
Jun 30, 2008, 7:52:18 PM (13 years ago)
Author:
livings124
Message:

#1065 QL Zooming in the inspector wasn't zooming to the icon

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileOutlineView.m

    r5904 r6269  
    117117- (NSRect) iconRectForRow: (int) row
    118118{
    119     FileNameCell * cell = (FileNameCell *)[[self tableColumnWithIdentifier: @"Name"] dataCell];
    120     return [cell imageRectForBounds: [self rectOfRow: row]];
     119    FileNameCell * cell = (FileNameCell *)[self preparedCellAtColumn: [self columnWithIdentifier: @"Name"] row: row];
     120    NSRect iconRect = [cell imageRectForBounds: [self rectOfRow: row]];
     121   
     122    iconRect.origin.x += [self frameOfOutlineCellAtRow: row].size.width;
     123    iconRect.origin.x += [self indentationPerLevel] * (float)([self levelForRow: row] + ([[self itemAtRow: row] isFolder] ? 0 : 1));
     124    return iconRect;
    121125}
    122126
  • trunk/macosx/NSStringAdditions.m

    r6261 r6269  
    151151                                                            | NSWidthInsensitiveSearch | NSForcedOrderingSearch)
    152152                                                        : (NSCaseInsensitiveSearch | NSNumericSearch);
    153    
    154153    return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
    155154}
     
    158157{
    159158    int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSNumericSearch | NSForcedOrderingSearch) : NSNumericSearch;
    160    
    161159    return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
    162160}
Note: See TracChangeset for help on using the changeset viewer.