Changeset 5945


Ignore:
Timestamp:
May 27, 2008, 6:05:05 AM (14 years ago)
Author:
livings124
Message:

allow transfers to be dragged when status fields are hit; trivial efficiency improvements when drawing torrent cells

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentCell.m

    r5944 r5945  
    164164- (NSRect) minimalStatusRectForBounds: (NSRect) bounds
    165165{
     166    if (![fDefaults boolForKey: @"SmallView"])
     167        return NSZeroRect;
     168   
    166169    return [self rectForMinimalStatusWithString: [self attributedStatusString: [self minimalStatusString] withColor: nil]
    167170            inBounds: bounds];
     
    170173- (NSRect) progressRectForBounds: (NSRect) bounds
    171174{
     175    if ([fDefaults boolForKey: @"SmallView"])
     176        return NSZeroRect;
     177   
    172178    return [self rectForProgressWithString: [self attributedStatusString: [[self representedObject] progressString] withColor: nil]
    173179            inBounds: bounds];
     
    195201- (NSRect) statusRectForBounds: (NSRect) bounds
    196202{
     203    if ([fDefaults boolForKey: @"SmallView"])
     204        return NSZeroRect;
     205   
    197206    return [self rectForStatusWithString: [self attributedStatusString: [self statusString] withColor: nil] inBounds: bounds];
    198207}
     
    249258   
    250259    if (NSMouseInRect(point, [self controlButtonRectForBounds: cellFrame], [controlView isFlipped])
    251         || NSMouseInRect(point, [self revealButtonRectForBounds: cellFrame], [controlView isFlipped])
    252         || (NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped]) && [[self representedObject] folder])
    253         || NSMouseInRect(point, [self minimalStatusRectForBounds: cellFrame], [controlView isFlipped]))
     260        || NSMouseInRect(point, [self revealButtonRectForBounds: cellFrame], [controlView isFlipped]))
    254261        return NSCellHitContentArea | NSCellHitTrackableArea;
    255262   
     
    779786- (NSRect) rectForMinimalStatusWithString: (NSAttributedString *) string inBounds: (NSRect) bounds
    780787{
    781     if (![fDefaults boolForKey: @"SmallView"])
    782         return NSZeroRect;
    783    
    784788    NSRect result = bounds;
    785789    result.size = [string size];
     
    809813- (NSRect) rectForProgressWithString: (NSAttributedString *) string inBounds: (NSRect) bounds
    810814{
    811     if ([fDefaults boolForKey: @"SmallView"])
    812         return NSZeroRect;
    813    
    814815    NSRect result = bounds;
    815816    result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE + PADDING_BETWEEN_TITLE_AND_PROGRESS;
     
    824825- (NSRect) rectForStatusWithString: (NSAttributedString *) string inBounds: (NSRect) bounds
    825826{
    826     if ([fDefaults boolForKey: @"SmallView"])
    827         return NSZeroRect;
    828    
    829827    NSRect result = bounds;
    830828    result.origin.y += PADDING_ABOVE_TITLE + HEIGHT_TITLE + PADDING_BETWEEN_TITLE_AND_PROGRESS + HEIGHT_STATUS
Note: See TracChangeset for help on using the changeset viewer.