Ticket #244: colors.patch

File colors.patch, 2.8 KB (added by tkcne, 15 years ago)
  • macosx/CTGradient/CTGradientAdditions.m

     
    312312
    313313+ (CTGradient *)progressYellowGradient
    314314{
    315     #warning someone make a real one!
    316     return [CTGradient gradientWithBeginningColor: [NSColor orangeColor] endingColor: [NSColor yellowColor]];
     315    CTGradient *newInstance = [[[self class] alloc] init];
     316   
     317    CTGradientElement color1;
     318    color1.red = 0.85;
     319    color1.green = 0.75;
     320    color1.blue  = 0.50;
     321    color1.alpha = 1.00;
     322    color1.position = 0;
     323   
     324    CTGradientElement color2;
     325    color2.red = 0.95;
     326    color2.green = 0.85;
     327    color2.blue  = 0.00;
     328    color2.alpha = 1.00;
     329    color2.position = 0.5;
     330   
     331    CTGradientElement color3;
     332    color3.red = 0.97;
     333    color3.green = 0.87;
     334    color3.blue  = 0.45;
     335    color3.alpha = 1.00;
     336    color3.position = 0.5;
     337   
     338    CTGradientElement color4;
     339    color4.red = 0.99;
     340    color4.green = 0.89;
     341        color4.blue  = 0.48;
     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];
    317351}
    318352
    319353+ (CTGradient *)progressTransparentGradient
     
    322356   
    323357    CTGradientElement color1;
    324358    color1.red = color1.green = color1.blue = 1.0;
    325     color1.alpha = 0.65;
     359    color1.alpha = 0.48;
    326360    color1.position = 0;
    327361   
    328362    CTGradientElement color2;
     
    332366   
    333367    CTGradientElement color3;
    334368    color3.red = color3.green = color3.blue = 1.0;
    335     color3.alpha = 0.4;
     369    color3.alpha = 0.3;
    336370    color3.position = 0.5;
    337371   
    338372    CTGradientElement color4;
    339373    color4.red = color4.green = color4.blue = 1.0;
    340     color4.alpha = 0.4;
     374    color4.alpha = 0.31;
    341375    color4.position = 1;
    342376   
    343377    [newInstance addElement:&color1];
  • macosx/Torrent.m

     
    6767#define BE OSSwapBigToHostConstInt32
    6868
    6969static uint32_t kRed   = BE(0xFF6450FF), //255, 100, 80
    70                 kBlue = BE(0x50A0FFFF), //80, 160, 255
     70                kBlue = BE(0x0072ffFF), //0, 114, 255
    7171                kBlue2 = BE(0x1E46B4FF), //30, 70, 180
    7272                kGray  = BE(0x969696FF), //150, 150, 150
    7373                kGreen1 = BE(0x99FFCCFF), //153, 255, 204
     
    18361836        p[i] = kBlue2;
    18371837        p[i + bytesPerRow / 4] = kBlue2;
    18381838    }
    1839     for (; i < avail + have; i++)
    1840     {
    1841         p[i] = kGreen3;
    1842         p[i + bytesPerRow / 4] = kGreen3;
    1843     }
    18441839    for (; i < MAX_PIECES; i++)
    18451840    {
    18461841        p[i] = kWhite;