Changeset 9811


Ignore:
Timestamp:
Dec 21, 2009, 11:47:16 PM (12 years ago)
Author:
livings124
Message:

replace a 10.6-deprecated method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoTabButtonCell.m

    r7659 r9811  
    6767    if (fIcon)
    6868    {
    69         NSSize iconSize = [fIcon size], tabSize = [tabImage size];
    70         NSPoint point = NSMakePoint(floorf((tabSize.width - iconSize.width) * 0.5),
    71                                     floorf((tabSize.height - iconSize.height) * 0.5));
     69        const NSSize iconSize = [fIcon size], tabSize = [tabImage size];
     70       
     71        const NSRect iconRect = NSMakeRect(floor((tabSize.width - iconSize.width) * 0.5),
     72                                            floor((tabSize.height - iconSize.height) * 0.5),
     73                                            iconSize.width, iconSize.height);
    7274       
    7375        [tabImage lockFocus];
    74         [fIcon compositeToPoint: point operation: NSCompositeSourceOver];
     76        [fIcon drawInRect: iconRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
    7577        [tabImage unlockFocus];
    7678    }
Note: See TracChangeset for help on using the changeset viewer.