Changeset 989


Ignore:
Timestamp:
Oct 6, 2006, 8:45:59 PM (15 years ago)
Author:
livings124
Message:

Swap green and blue in the advanced bar/pieces view

Location:
trunk/macosx
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PiecesView.h

    r988 r989  
    3030    int8_t  * fPieces;
    3131   
    32     NSImage * fBack, * fWhitePiece, * fGreenPiece, * fRedPiece,
    33             * fBlue1Piece, * fBlue2Piece, * fBlue3Piece;
     32    NSImage * fBack, * fWhitePiece, * fBluePiece, * fRedPiece,
     33            * fGreen1Piece, * fGreen2Piece, * fGreen3Piece;
    3434   
    3535    Torrent * fTorrent;
  • trunk/macosx/PiecesView.m

    r988 r989  
    6363        [fWhitePiece unlockFocus];
    6464       
    65         //green box image
    66         fGreenPiece = [[NSImage alloc] initWithSize: size];
    67        
    68         [fGreenPiece lockFocus];
    69         [[NSColor colorWithCalibratedRed: 0.557 green: 0.992 blue: 0.639 alpha: 1.0] set];
    70         [bp fill];
    71         [fGreenPiece unlockFocus];
    72        
    73         //green box image
     65        //blue box image
     66        fBluePiece = [[NSImage alloc] initWithSize: size];
     67       
     68        [fBluePiece lockFocus];
     69        [[NSColor colorWithCalibratedRed: 0.35 green: 0.65 blue: 1.0 alpha: 1.0] set];
     70        [bp fill];
     71        [fBluePiece unlockFocus];
     72       
     73        //red box image
    7474        fRedPiece = [[NSImage alloc] initWithSize: size];
    7575       
     
    7979        [fRedPiece unlockFocus];
    8080       
    81         //blue 1 box image
    82         fBlue1Piece = [[NSImage alloc] initWithSize: size];
    83        
    84         [fBlue1Piece lockFocus];
    85         [[NSColor colorWithCalibratedRed: 0.682 green: 0.839 blue: 1.0 alpha: 1.0] set];
    86         [bp fill];
    87         [fBlue1Piece unlockFocus];
    88        
    89         //blue 2 box image
    90         fBlue2Piece = [[NSImage alloc] initWithSize: size];
    91        
    92         [fBlue2Piece lockFocus];
    93         [[NSColor colorWithCalibratedRed: 0.506 green: 0.745 blue: 1.0 alpha: 1.0] set];
    94         [bp fill];
    95         [fBlue2Piece unlockFocus];
    96        
    97         //blue 3 box image
    98         fBlue3Piece = [[NSImage alloc] initWithSize: size];
    99        
    100         [fBlue3Piece lockFocus];
    101         [[NSColor colorWithCalibratedRed: 0.35 green: 0.65 blue: 1.0 alpha: 1.0] set];
    102         [bp fill];
    103         [fBlue3Piece unlockFocus];
     81        //green 1 box image
     82        fGreen1Piece = [[NSImage alloc] initWithSize: size];
     83       
     84        [fGreen1Piece lockFocus];
     85        [[NSColor colorWithCalibratedRed: 0.6 green: 1.0 blue: 0.8 alpha: 1.0] set];
     86        [bp fill];
     87        [fGreen1Piece unlockFocus];
     88       
     89        //green 2 box image
     90        fGreen2Piece = [[NSImage alloc] initWithSize: size];
     91       
     92        [fGreen2Piece lockFocus];
     93        [[NSColor colorWithCalibratedRed: 0.4 green: 1.0 blue: 0.6 alpha: 1.0] set];
     94        [bp fill];
     95        [fGreen2Piece unlockFocus];
     96       
     97        //green 3 box image
     98        fGreen3Piece = [[NSImage alloc] initWithSize: size];
     99       
     100        [fGreen3Piece lockFocus];
     101        [[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] set];
     102        [bp fill];
     103        [fGreen3Piece unlockFocus];
    104104       
    105105        //actually draw the box
     
    114114    [fWhitePiece release];
    115115    [fRedPiece release];
    116     [fGreenPiece release];
    117     [fBlue1Piece release];
    118     [fBlue2Piece release];
    119     [fBlue3Piece release];
     116    [fBluePiece release];
     117    [fGreen1Piece release];
     118    [fGreen2Piece release];
     119    [fGreen3Piece release];
    120120   
    121121    if (fTorrent)
     
    197197                {
    198198                    fPieces[index] = -1;
    199                     pieceImage = fGreenPiece;
     199                    pieceImage = fBluePiece;
    200200                }
    201201                else if (fPieces[index] != -1)
     
    219219                {
    220220                    fPieces[index] = 1;
    221                     pieceImage = fBlue1Piece;
     221                    pieceImage = fGreen1Piece;
    222222                }
    223223            }
     
    227227                {
    228228                    fPieces[index] = 2;
    229                     pieceImage = fBlue2Piece;
     229                    pieceImage = fGreen2Piece;
    230230                }
    231231            }
     
    235235                {
    236236                    fPieces[index] = 3;
    237                     pieceImage = fBlue3Piece;
     237                    pieceImage = fGreen3Piece;
    238238                }
    239239            }
  • trunk/macosx/Torrent.m

    r987 r989  
    5151
    5252static uint32_t kRed   = BE(0xFF6450FF), //255, 100, 80
    53                 kBlue1 = BE(0xA0DCFFFF), //160, 220, 255
    54                 kBlue2 = BE(0x78BEFFFF), //120, 190, 255
    55                 kBlue3 = BE(0x50A0FFFF), //80, 160, 255
    56                 kBlue4 = BE(0x1E46B4FF), //30, 70, 180
     53                kBlue = BE(0x50A0FFFF), //80, 160, 255
     54                kBlue2 = BE(0x1E46B4FF), //30, 70, 180
    5755                kGray  = BE(0x969696FF), //150, 150, 150
    58                 kGreen = BE(0x00FF00FF), //0, 255, 0
     56                kGreen1 = BE(0x99FFCCFF), //153, 255, 204
     57                kGreen2 = BE(0x66FF99FF), //102, 255, 153
     58                kGreen3 = BE(0x00FF66FF), //0, 255, 102
    5959                kWhite = BE(0xFFFFFFFF); //255, 255, 255
    6060
     
    854854    [self getAvailability: pieces size: MAX_PIECES];
    855855   
    856     //lines 2 to 14: blue or grey depending on whether we have the piece or not
     856    //lines 2 to 14: blue, green, or gray depending on whether we have the piece or not
    857857    int have = 0, avail = 0;
    858858    uint32_t color;
     
    865865            if (fPieces[w] != -1)
    866866            {
    867                 color = kGreen;
     867                color = kBlue;
    868868                fPieces[w] = -1;
    869869                change = YES;
     
    886886                if (fPieces[w] != 1)
    887887                {
    888                     color = kBlue1;
     888                    color = kGreen1;
    889889                    fPieces[w] = 1;
    890890                    change = YES;
     
    895895                if (fPieces[w] != 2)
    896896                {
    897                     color = kBlue2;
     897                    color = kGreen2;
    898898                    fPieces[w] = 2;
    899899                    change = YES;
     
    904904                if (fPieces[w] != 3)
    905905                {
    906                     color = kBlue3;
     906                    color = kGreen3;
    907907                    fPieces[w] = 3;
    908908                    change = YES;
     
    928928    for (w = 0; w < have; w++)
    929929    {
    930         p[w] = kBlue4;
    931         p[w + bytesPerRow / 4] = kBlue4;
     930        p[w] = kBlue2;
     931        p[w + bytesPerRow / 4] = kBlue2;
    932932    }
    933933    for (; w < avail + have; w++)
    934934    {
    935         p[w] = kGreen;
    936         p[w + bytesPerRow / 4] = kGreen;
     935        p[w] = kGreen3;
     936        p[w + bytesPerRow / 4] = kGreen3;
    937937    }
    938938    for (; w < MAX_PIECES; w++)
  • trunk/macosx/Transmission Help/html/FAQ.html

    r968 r989  
    4242                                <h1>What do the colors mean in the advanced progress bar/pieces box? </h1>
    4343                        </div>
    44                                 <p><font color="green">Green</font>: we have this piece <br>
     44                                <p><font color="green">Blue</font>: we have this piece <br>
    4545                                <font color="gray">Gray/White</font>: no connected peers have this piece <br>
    46                                 <font color="blue">Blue</font>: connected peers have this piece (the darker the blue, the more there are) <br>
     46                                <font color="blue">Green</font>: connected peers have this piece (the darker the green, the more there are) <br>
    4747                               
    4848                                <p>The fine, dark blue line on top of the bar shows the global progression, while the green line following it shows how much of the remaining download is actually available.<br>
Note: See TracChangeset for help on using the changeset viewer.