Changeset 9121


Ignore:
Timestamp:
Sep 15, 2009, 4:56:48 AM (13 years ago)
Author:
livings124
Message:

on 10.6 avoid some wizardry to work around a 10.5 bug when switching a table's image's template setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentTableView.m

    r9095 r9121  
    172172        {
    173173            //ensure arrows are white only when selected
    174             NSImage * image = [cell image];
    175             BOOL template = [cell backgroundStyle] == NSBackgroundStyleLowered;
    176             if ([image isTemplate] != template)
     174            if ([NSApp isOnSnowLeopardOrBetter])
     175                [[cell image] setTemplate: [cell backgroundStyle] == NSBackgroundStyleLowered];
     176            else
    177177            {
    178                 [image setTemplate: template];
    179                 [cell setImage: nil];
    180                 [cell setImage: image];
     178                NSImage * image = [cell image];
     179                const BOOL template = [cell backgroundStyle] == NSBackgroundStyleLowered;
     180                if ([image isTemplate] != template)
     181                {
     182                    [image setTemplate: template];
     183                    [cell setImage: nil];
     184                    [cell setImage: image];
     185                }
    181186            }
    182187        }
Note: See TracChangeset for help on using the changeset viewer.