Ignore:
Timestamp:
Mar 12, 2006, 3:28:31 PM (16 years ago)
Author:
titer
Message:

Started to restore the start/resume/reveal buttons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_api/macosx/TorrentTableView.m

    r149 r150  
    5252    NSRect cellRect, rect;
    5353
    54     col      = [self columnWithIdentifier: @"Name"];
     54    col      = [self columnWithIdentifier: @"Torrent"];
    5555    cellRect = [self frameOfCellAtColumn: col row: row];
    56     rect     = NSMakeRect( cellRect.origin.x + cellRect.size.width - 19,
    57                            cellRect.origin.y + cellRect.size.height - 38,
    58                            14, 14 );
     56    rect     = NSMakeRect( cellRect.origin.x + cellRect.size.width - 39,
     57                           cellRect.origin.y + 3, 14, 14 );
    5958
    6059    return rect;
     
    6665    NSRect cellRect, rect;
    6766
    68     col      = [self columnWithIdentifier: @"Name"];
     67    col      = [self columnWithIdentifier: @"Torrent"];
    6968    cellRect = [self frameOfCellAtColumn: col row: row];
    70     rect     = NSMakeRect( cellRect.origin.x + cellRect.size.width - 19,
    71                            cellRect.origin.y + cellRect.size.height - 19,
    72                            14, 14 );
     69    rect     = NSMakeRect( cellRect.origin.x + cellRect.size.width - 20,
     70                           cellRect.origin.y + 3, 14, 14 );
    7371
    7472    return rect;
     
    148146    [super drawRect: r];
    149147
    150 #if 0
    151148    for( i = 0; i < [self numberOfRows]; i++ )
    152149    {
    153150        rect  = [self pauseRectForRow: i];
    154151        image = NULL;
     152#if 0
    155153        if( fStat[i].status & TR_STATUS_PAUSE )
    156154        {
     155#endif
    157156            image = NSPointInRect( fClickPoint, rect ) ?
    158157                [NSImage imageNamed: @"ResumeOn.png"] :
    159158                [NSImage imageNamed: @"ResumeOff.png"];
     159#if 0
    160160        }
    161161        else if( fStat[i].status &
     
    166166                [NSImage imageNamed: @"PauseOff.png"];
    167167        }
     168#endif
    168169        if( image )
    169170        {
    170             point = NSMakePoint( rect.origin.x, rect.origin.y + 14 );
    171             [image compositeToPoint: point operation: NSCompositeSourceOver];
     171            [image setFlipped: YES];
     172            [image drawAtPoint: rect.origin fromRect:
     173                NSMakeRect( 0, 0, 14, 14 ) operation:
     174                NSCompositeSourceOver fraction: 1.0];
    172175        }
    173176
     
    176179            [NSImage imageNamed: @"RevealOn.png"] :
    177180            [NSImage imageNamed: @"RevealOff.png"];
    178         point = NSMakePoint( rect.origin.x, rect.origin.y + 14 );
    179         [image compositeToPoint: point operation: NSCompositeSourceOver];
     181        [image setFlipped: YES];
     182        [image drawAtPoint: rect.origin fromRect:
     183            NSMakeRect( 0, 0, 14, 14 ) operation:
     184            NSCompositeSourceOver fraction: 1.0];
    180185    }
    181 #endif
    182186}
    183187
Note: See TracChangeset for help on using the changeset viewer.