Changeset 9320


Ignore:
Timestamp:
Oct 18, 2009, 3:02:10 AM (12 years ago)
Author:
livings124
Message:

don't use setFlipped: on the file node's image on 10.6

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileListNode.m

    r7659 r9320  
    117117{
    118118    if (!fIsFolder && !fIcon)
    119     {
    120119        fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: [fName pathExtension]] retain];
    121         [fIcon setFlipped: YES];
    122     }
    123120    return fIcon;
    124121}
  • trunk/macosx/FileNameCell.m

    r9217 r9320  
    2727#import "Torrent.h"
    2828#import "FileListNode.h"
     29#import "NSApplicationAdditions.h"
    2930#import "NSStringAdditions.h"
    3031
     
    9899    {
    99100        if (!fFolderImage)
    100         {
    101101            fFolderImage = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
    102             [fFolderImage setFlipped: YES];
    103         }
    104102        image = fFolderImage;
    105103    }
     
    138136{
    139137    //icon
    140     [[self image] drawInRect: [self imageRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
     138    if ([NSApp isOnSnowLeopardOrBetter])
     139        [[self image] drawInRect: [self imageRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0
     140            respectFlipped: YES hints: nil];
     141    else
     142    {
     143        NSImage * image = [self image];
     144        [image setFlipped: YES];
     145        [image drawInRect: [self imageRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
     146    }
    141147   
    142148    NSColor * titleColor, * statusColor;
  • trunk/macosx/GroupsPrefsController.m

    r9002 r9320  
    298298- (void) ruleEditorRowsDidChange: (NSNotification *) notification
    299299{
    300     CGFloat rowHeight        = [fRuleEditor rowHeight];
    301     NSInteger numberOfRows   = [fRuleEditor numberOfRows];
    302     CGFloat ruleEditorHeight = numberOfRows * rowHeight;
    303     CGFloat heightDifference = ruleEditorHeight - [fRuleEditor frame].size.height;
    304     NSRect windowFrame       = [fRuleEditor window].frame;
     300    const CGFloat heightDifference = [fRuleEditor numberOfRows] * [fRuleEditor rowHeight] - [fRuleEditor frame].size.height;
     301    NSRect windowFrame = [fRuleEditor window].frame;
    305302    windowFrame.size.height += heightDifference;
    306     windowFrame.origin.y    -= heightDifference;
     303    windowFrame.origin.y -= heightDifference;
     304   
    307305    [fRuleEditor.window setFrame: windowFrame display: YES animate: YES];
    308306}
  • trunk/macosx/TorrentTableView.m

    r9316 r9320  
    905905        NSImage * icon;
    906906        if (![node isFolder])
    907             icon = [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]];
     907            icon = [node icon];
    908908        else
    909909        {
Note: See TracChangeset for help on using the changeset viewer.