Changeset 2293


Ignore:
Timestamp:
Jul 4, 2007, 9:50:50 PM (15 years ago)
Author:
livings124
Message:

slightly color the progress bars of waiting (queued)torrents, and adjust the light green color a bit (thanks macHD for the gradients)

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/CTGradient/CTGradientAdditions.h

    r2277 r2293  
    3535+ (CTGradient *)progressLightGrayGradient;
    3636+ (CTGradient *)progressBlueGradient;
     37+ (CTGradient *)progressDarkBlueGradient;
    3738+ (CTGradient *)progressGreenGradient;
    3839+ (CTGradient *)progressLightGreenGradient;
     40+ (CTGradient *)progressDarkGreenGradient;
    3941+ (CTGradient *)progressYellowGradient;
    4042+ (CTGradient *)progressTransparentGradient;
  • trunk/macosx/CTGradient/CTGradientAdditions.m

    r2278 r2293  
    231231}
    232232
     233+ (CTGradient *)progressDarkBlueGradient
     234{
     235    CTGradient *newInstance = [[[self class] alloc] init];
     236   
     237    CTGradientElement color1;
     238    color1.red = 0.616;
     239    color1.green = 0.722;
     240    color1.blue  = 0.776;
     241    color1.alpha = 1.00;
     242    color1.position = 0;
     243   
     244    CTGradientElement color2;
     245    color2.red = 0.525;
     246    color2.green = 0.631;
     247    color2.blue  = 0.737;
     248    color2.alpha = 1.00;
     249    color2.position = 0.5;
     250   
     251    CTGradientElement color3;
     252    color3.red = 0.651;
     253    color3.green = 0.725;
     254    color3.blue  = 0.804;
     255    color3.alpha = 1.00;
     256    color3.position = 0.5;
     257   
     258    CTGradientElement color4;
     259    color4.red = 0.659;
     260    color4.green = 0.733;
     261    color4.blue  = 0.800;
     262    color4.alpha = 1.00;
     263    color4.position = 1;
     264   
     265    [newInstance addElement:&color1];
     266    [newInstance addElement:&color2];
     267    [newInstance addElement:&color3];
     268    [newInstance addElement:&color4];
     269   
     270    return [newInstance autorelease];
     271}
     272
    233273+ (CTGradient *)progressGreenGradient
    234274{
     
    276316   
    277317    CTGradientElement color1;
    278     color1.red = 0.478;
    279     color1.green = 1.00;
    280     color1.blue  = 0.55;
    281     color1.alpha = 1.00;
    282     color1.position = 0;
    283    
    284     CTGradientElement color2;
    285     color2.red = 0.388;
    286     color2.green = 0.92;
    287     color2.blue  = 0.44;
    288     color2.alpha = 1.00;
    289     color2.position = 0.5;
    290    
    291     CTGradientElement color3;
    292     color3.red = 0.627;
    293     color3.green = 1.00;
    294     color3.blue  = 0.53;
    295     color3.alpha = 1.00;
    296     color3.position = 0.5;
    297    
    298     CTGradientElement color4;
    299     color4.red = 0.675;
    300     color4.green = 1.00;
    301     color4.blue  = 0.55;
     318    color1.red = 0.522;
     319    color1.green = 0.894;
     320    color1.blue  = 0.565;
     321    color1.alpha = 1.00;
     322    color1.position = 0;
     323   
     324    CTGradientElement color2;
     325    color2.red = 0.373;
     326    color2.green = 0.780;
     327    color2.blue  = 0.408;
     328    color2.alpha = 1.00;
     329    color2.position = 0.5;
     330   
     331    CTGradientElement color3;
     332    color3.red = 0.659;
     333    color3.green = 0.918;
     334    color3.blue  = 0.604;
     335    color3.alpha = 1.00;
     336    color3.position = 0.5;
     337   
     338    CTGradientElement color4;
     339    color4.red = 0.678;
     340    color4.green = 0.929;
     341    color4.blue  = 0.608;
     342    color4.alpha = 1.00;
     343    color4.position = 1;
     344   
     345    [newInstance addElement:&color1];
     346    [newInstance addElement:&color2];
     347    [newInstance addElement:&color3];
     348    [newInstance addElement:&color4];
     349   
     350    return [newInstance autorelease];
     351}
     352
     353+ (CTGradient *)progressDarkGreenGradient
     354{
     355    CTGradient *newInstance = [[[self class] alloc] init];
     356   
     357    CTGradientElement color1;
     358    color1.red = 0.627;
     359    color1.green = 0.714;
     360    color1.blue  = 0.639;
     361    color1.alpha = 1.00;
     362    color1.position = 0;
     363   
     364    CTGradientElement color2;
     365    color2.red = 0.545;
     366    color2.green = 0.635;
     367    color2.blue  = 0.561;
     368    color2.alpha = 1.00;
     369    color2.position = 0.5;
     370   
     371    CTGradientElement color3;
     372    color3.red = 0.690;
     373    color3.green = 0.745;
     374    color3.blue  = 0.675;
     375    color3.alpha = 1.00;
     376    color3.position = 0.5;
     377   
     378    CTGradientElement color4;
     379    color4.red = 0.694;
     380    color4.green = 0.741;
     381    color4.blue  = 0.678;
    302382    color4.alpha = 1.00;
    303383    color4.position = 1;
  • trunk/macosx/Torrent.m

    r2284 r2293  
    526526                                    [NSNumber numberWithBool: [self isSeeding]], @"Seeding",
    527527                                    [NSNumber numberWithBool: [self isChecking]], @"Checking",
     528                                    [NSNumber numberWithBool: fWaitToStart], @"Waiting",
    528529                                    [NSNumber numberWithBool: [self isError]], @"Error", nil];
    529530   
  • trunk/macosx/TorrentCell.m

    r2286 r2293  
    5151        fLightGrayGradient = [[CTGradient progressLightGrayGradient] retain];
    5252        fBlueGradient = [[CTGradient progressBlueGradient] retain];
    53         //fDarkBlueGradient = [[CTGradient progressDarkBlueGradient] retain];
     53        fDarkBlueGradient = [[CTGradient progressDarkBlueGradient] retain];
    5454        fGreenGradient = [[CTGradient progressGreenGradient] retain];
    5555        fLightGreenGradient = [[CTGradient progressLightGreenGradient] retain];
    56         //fDarkGreenGradient = [[CTGradient progressDarkGreenGradient] retain];
     56        fDarkGreenGradient = [[CTGradient progressDarkGreenGradient] retain];
    5757        fYellowGradient = [[CTGradient progressYellowGradient] retain];
    5858        fTransparentGradient = [[CTGradient progressTransparentGradient] retain];
     
    8989    completeBounds.size.width = progress * width;
    9090   
     91    float left = INVALID;
    9192    if (progress < 1.0)
    9293    {
    9394        [fWhiteGradient fillRect: barBounds angle: -90];
    9495       
    95         float left = [[info objectForKey: @"Left"] floatValue];
     96        left = [[info objectForKey: @"Left"] floatValue];
    9697        if ((progress + left) < 1.0)
    9798        {
     
    121122    }
    122123    else
    123         [fGrayGradient fillRect: completeBounds angle: -90];
     124    {
     125        if ([[info objectForKey: @"Waiting"] boolValue])
     126        {
     127            if (left == INVALID)
     128                left = [[info objectForKey: @"Left"] floatValue];
     129           
     130            if (left <= 0.0)
     131                [fDarkGreenGradient fillRect: completeBounds angle: -90];
     132            else
     133                [fDarkBlueGradient fillRect: completeBounds angle: -90];
     134        }
     135        else
     136            [fGrayGradient fillRect: completeBounds angle: -90];
     137    }
    124138   
    125139    [[NSColor colorWithDeviceWhite: 0.0 alpha: 0.2] set];
Note: See TracChangeset for help on using the changeset viewer.