Changeset 11794


Ignore:
Timestamp:
Jan 30, 2011, 7:32:40 PM (11 years ago)
Author:
livings124
Message:

tweak inspector button drawing to account for black lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoTabButtonCell.m

    r11789 r11794  
    6464    [tabImage lockFocus];
    6565   
     66    NSGradient * gradient;
    6667    if (fSelected)
    6768    {
    6869        NSColor * lightColor = [NSColor colorForControlTint: [NSColor currentControlTint]];
    6970        NSColor * darkColor = [lightColor blendedColorWithFraction: 0.2 ofColor: [NSColor blackColor]];
    70         NSGradient * gradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
    71         [gradient drawInRect: tabRect angle: 270.0];
    72         [gradient release];
     71        gradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
    7372    }
    7473    else
     
    7675        NSColor * lightColor = [NSColor colorWithCalibratedRed: 245.0/255.0 green: 245.0/255.0 blue: 245.0/255.0 alpha: 1.0];
    7776        NSColor * darkColor = [NSColor colorWithCalibratedRed: 215.0/255.0 green: 215.0/255.0 blue: 215.0/255.0 alpha: 1.0];
    78         NSGradient * gradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
    79         [gradient drawInRect: tabRect angle: 270.0];
    80         [gradient release];
     77        gradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
    8178    }
    8279   
     
    8582    NSRectFill(NSMakeRect(0.0, NSHeight(tabRect) - 1.0, NSWidth(tabRect), 1.0));
    8683    NSRectFill(NSMakeRect(NSWidth(tabRect) - 1.0, 1.0, NSWidth(tabRect) - 1.0, NSHeight(tabRect) - 2.0));
     84   
     85    tabRect = NSMakeRect(0.0, 1.0, NSWidth(tabRect) - 1.0, NSHeight(tabRect) - 2.0);
     86   
     87    [gradient drawInRect: tabRect angle: 270.0];
     88    [gradient release];
    8789   
    8890    if (fIcon)
Note: See TracChangeset for help on using the changeset viewer.