Changeset 531


Ignore:
Timestamp:
Jul 5, 2006, 10:47:48 PM (16 years ago)
Author:
livings124
Message:

Some refinement in Small View.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentCell.m

    r530 r531  
    347347        const float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * padding - extraNameShift;
    348348       
    349         NSAttributedString * nameString = [[fTorrent name] attributedStringFittingInWidth: mainWidth
    350                                     attributes: nameAttributes];
    351         NSAttributedString * statusString = [[fTorrent shortStatusString] attributedStringFittingInWidth: mainWidth
    352                                                 attributes: statusAttributes];
     349        NSAttributedString * statusString = [[[NSAttributedString alloc] initWithString: [fTorrent shortStatusString]
     350                                                    attributes: statusAttributes] autorelease];
     351        NSAttributedString * nameString = [[fTorrent name] attributedStringFittingInWidth:
     352                                mainWidth - [statusString size].width - linePadding attributes: nameAttributes];
    353353                     
    354354        //place name string
     
    360360        //place status string
    361361        pen.x = cellFrame.origin.x + cellFrame.size.width - padding - [statusString size].width;
    362         pen.y += [nameString size].height - [statusString size].height;
     362        pen.y += ([nameString size].height - [statusString size].height) * 0.5;
    363363       
    364364        [statusString drawAtPoint: pen];
     
    366366        //progress bar
    367367        pen.x = cellFrame.origin.x + iconSize.width + 2.0 * padding;
    368         pen.y += [statusString size].height + linePadding + BAR_HEIGHT;
     368        pen.y = cellFrame.origin.y + [nameString size].height + 2.0 * linePadding + BAR_HEIGHT;
    369369       
    370370        const float barWidth = mainWidth + extraNameShift - BUTTONS_TOTAL_WIDTH + padding;
Note: See TracChangeset for help on using the changeset viewer.