Changeset 858


Ignore:
Timestamp:
Sep 12, 2006, 12:51:11 AM (15 years ago)
Author:
livings124
Message:

advanced bar doesn't need to generate it's own border

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r857 r858  
    336336
    337337    //left and right borders
    338     p = (uint32_t *) bitmapData;
     338    /*p = (uint32_t *) bitmapData;
    339339    for(h = 0; h < BAR_HEIGHT; h++)
    340340    {
     
    342342        p[width - 1] = kBorder[h];
    343343        p += bytesPerRow / 4;
    344     }
     344    }*/
    345345
    346346    int8_t * pieces = malloc(width);
     
    352352
    353353    //first two lines: dark blue to show progression, green to show available
    354     int end = lrintf(floor([self progress] * (width - 2)));
    355     p = (uint32_t *) (bitmapData) + 1;
     354    int end = lrintf(floor([self progress] * width));
     355    p = (uint32_t *) bitmapData;
    356356
    357357    for (w = 0; w < end; w++)
     
    373373    //lines 2 to 14: blue or grey depending on whether we have the piece or not
    374374    uint32_t color;
    375     for( w = 0; w < width - 2; w++ )
    376     {
    377         //point to pixel ( 2 + w, 2 ). We will then draw "vertically"
    378         p = (uint32_t *) ( bitmapData + 2 * bytesPerRow ) + 1 + w;
    379 
     375    for( w = 0; w < width; w++ )
     376    {
    380377        if (pieces[w] < 0)
    381378            color = kGray;
     
    388385        else
    389386            color = kBlue3;
    390 
     387       
     388        //point to pixel ( w, 2 ) and draw "vertically"
     389        p = (uint32_t *) ( bitmapData + 2 * bytesPerRow ) + w;
    391390        for( h = 2; h < BAR_HEIGHT; h++ )
    392391        {
  • trunk/macosx/TorrentCell.m

    r856 r858  
    158158        return;
    159159    }
    160 
     160   
     161    //draw overlay over advanced bar
     162    [fProgressEndAdvanced compositeToPoint: point operation: NSCompositeSourceOver];
     163   
     164    widthFloat -= 2.0;
     165    point.x += 1.0;
     166   
     167    //place actual advanced bar
    161168    NSImage * img = [info objectForKey: @"AdvancedBar"];
    162169    [img setSize: NSMakeSize(widthFloat, BAR_HEIGHT)];
    163 
    164170    [img compositeToPoint: point operation: NSCompositeSourceOver];
    165171   
    166     //draw overlay over advanced bar
    167     [fProgressEndAdvanced compositeToPoint: point operation: NSCompositeSourceOver];
    168    
    169     widthFloat -= 2.0;
    170     point.x += 1.0;
    171172    [self placeBar: fProgressAdvanced width: widthFloat point: point];
    172173   
Note: See TracChangeset for help on using the changeset viewer.