Changeset 10439


Ignore:
Timestamp:
Apr 2, 2010, 6:14:46 PM (12 years ago)
Author:
livings124
Message:

fix hovering over the pause/resume button in non-compact view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentCell.m

    r10438 r10439  
    247247        [rowInfo release];
    248248        [area release];
    249        
    250         //control button
    251         NSRect controlButtonRect = [self controlButtonRectForBounds: cellFrame];
    252         NSTrackingAreaOptions controlOptions = options;
    253         if (NSMouseInRect(mouseLocation, controlButtonRect, [controlView isFlipped]))
    254         {
    255             controlOptions |= NSTrackingAssumeInside;
    256             [(TorrentTableView *)controlView setControlButtonHover: [[userInfo objectForKey: @"Row"] integerValue]];
    257         }
    258        
    259         NSMutableDictionary * controlInfo = [userInfo mutableCopy];
    260         [controlInfo setObject: @"Control" forKey: @"Type"];
    261         area = [[NSTrackingArea alloc] initWithRect: controlButtonRect options: controlOptions owner: controlView
    262                                     userInfo: controlInfo];
    263         [controlView addTrackingArea: area];
    264         [controlInfo release];
    265         [area release];
    266     }
     249    }
     250   
     251    //control button
     252    NSRect controlButtonRect = [self controlButtonRectForBounds: cellFrame];
     253    NSTrackingAreaOptions controlOptions = options;
     254    if (NSMouseInRect(mouseLocation, controlButtonRect, [controlView isFlipped]))
     255    {
     256        controlOptions |= NSTrackingAssumeInside;
     257        [(TorrentTableView *)controlView setControlButtonHover: [[userInfo objectForKey: @"Row"] integerValue]];
     258    }
     259   
     260    NSMutableDictionary * controlInfo = [userInfo mutableCopy];
     261    [controlInfo setObject: @"Control" forKey: @"Type"];
     262    NSTrackingArea * area = [[NSTrackingArea alloc] initWithRect: controlButtonRect options: controlOptions owner: controlView
     263                                userInfo: controlInfo];
     264    [controlView addTrackingArea: area];
     265    [controlInfo release];
     266    [area release];
    267267   
    268268    //reveal button
     
    277277    NSMutableDictionary * revealInfo = [userInfo mutableCopy];
    278278    [revealInfo setObject: @"Reveal" forKey: @"Type"];
    279     NSTrackingArea * area = [[NSTrackingArea alloc] initWithRect: revealButtonRect options: revealOptions owner: controlView
     279    area = [[NSTrackingArea alloc] initWithRect: revealButtonRect options: revealOptions owner: controlView
    280280                                userInfo: revealInfo];
    281281    [controlView addTrackingArea: area];
Note: See TracChangeset for help on using the changeset viewer.