Changeset 537


Ignore:
Timestamp:
Jul 6, 2006, 12:33:24 AM (16 years ago)
Author:
livings124
Message:

tweak Minimal spacing a bit

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r535 r537  
    4444
    4545#define ROW_HEIGHT_REGULAR 65.0
    46 #define ROW_HEIGHT_SMALL 38.0
     46#define ROW_HEIGHT_SMALL 40.0
    4747
    4848#define WEBSITE_URL @"http://transmission.m0k.org/"
  • trunk/macosx/TorrentCell.m

    r531 r537  
    284284
    285285    NSPoint pen = cellFrame.origin;
    286     const float padding = 3.0, linePadding = 2.0, extraNameShift = 1.0;
     286    const float PADDING = 3.0, LINE_PADDING = 2.0, EXTRA_NAME_SHIFT = 1.0;
    287287
    288288    if (![fDefaults boolForKey: @"SmallView"]) //regular size
     
    292292        NSSize iconSize = [icon size];
    293293       
    294         pen.x += padding;
     294        pen.x += PADDING;
    295295        pen.y += (cellFrame.size.height - iconSize.height) * 0.5;
    296296       
     
    298298                operation: NSCompositeSourceOver fraction: 1.0];
    299299
    300         const float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * padding - extraNameShift;
     300        float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * PADDING - EXTRA_NAME_SHIFT;
    301301
    302302        //name string
    303         pen.x += iconSize.width + padding + extraNameShift;
    304         pen.y = cellFrame.origin.y + padding;
     303        pen.x += iconSize.width + PADDING + EXTRA_NAME_SHIFT;
     304        pen.y = cellFrame.origin.y + PADDING;
    305305        NSAttributedString * nameString = [[fTorrent name] attributedStringFittingInWidth: mainWidth
    306306                                                attributes: nameAttributes];
     
    308308       
    309309        //progress string
    310         pen.y += [nameString size].height + linePadding - 1.0;
     310        pen.y += [nameString size].height + LINE_PADDING - 1.0;
    311311       
    312312        NSAttributedString * progressString = [[fTorrent progressString]
     
    315315
    316316        //progress bar
    317         pen.x -= extraNameShift;
    318         pen.y += [progressString size].height + linePadding + BAR_HEIGHT;
    319        
    320         const float barWidth = mainWidth + extraNameShift - BUTTONS_TOTAL_WIDTH + padding;
     317        pen.x -= EXTRA_NAME_SHIFT;
     318        pen.y += [progressString size].height + LINE_PADDING + BAR_HEIGHT;
     319       
     320        float barWidth = mainWidth + EXTRA_NAME_SHIFT - BUTTONS_TOTAL_WIDTH + PADDING;
    321321       
    322322        if ([fDefaults boolForKey: @"UseAdvancedBar"])
     
    326326
    327327        //status string
    328         pen.x += extraNameShift;
    329         pen.y += linePadding;
     328        pen.x += EXTRA_NAME_SHIFT;
     329        pen.y += LINE_PADDING;
    330330        NSAttributedString * statusString = [[fTorrent statusString]
    331331            attributedStringFittingInWidth: mainWidth attributes: statusAttributes];
     
    338338        NSSize iconSize = [icon size];
    339339       
    340         pen.x += padding;
     340        pen.x += PADDING;
    341341        pen.y += (cellFrame.size.height - iconSize.height) * 0.5;
    342342       
     
    345345
    346346        //name and status string
    347         const float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * padding - extraNameShift;
     347        float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * PADDING - EXTRA_NAME_SHIFT;
    348348       
    349349        NSAttributedString * statusString = [[[NSAttributedString alloc] initWithString: [fTorrent shortStatusString]
    350350                                                    attributes: statusAttributes] autorelease];
    351351        NSAttributedString * nameString = [[fTorrent name] attributedStringFittingInWidth:
    352                                 mainWidth - [statusString size].width - linePadding attributes: nameAttributes];
     352                                mainWidth - [statusString size].width - LINE_PADDING attributes: nameAttributes];
    353353                     
    354354        //place name string
    355         pen.x += iconSize.width + padding + extraNameShift;
    356         pen.y = cellFrame.origin.y + linePadding;
     355        pen.x += iconSize.width + PADDING + EXTRA_NAME_SHIFT;
     356        pen.y = cellFrame.origin.y + LINE_PADDING;
    357357
    358358        [nameString drawAtPoint: pen];
    359359       
    360360        //place status string
    361         pen.x = cellFrame.origin.x + cellFrame.size.width - padding - [statusString size].width;
     361        pen.x = cellFrame.origin.x + cellFrame.size.width - PADDING - [statusString size].width;
    362362        pen.y += ([nameString size].height - [statusString size].height) * 0.5;
    363363       
     
    365365       
    366366        //progress bar
    367         pen.x = cellFrame.origin.x + iconSize.width + 2.0 * padding;
    368         pen.y = cellFrame.origin.y + [nameString size].height + 2.0 * linePadding + BAR_HEIGHT;
    369        
    370         const float barWidth = mainWidth + extraNameShift - BUTTONS_TOTAL_WIDTH + padding;
     367        pen.x = cellFrame.origin.x + iconSize.width + 2.0 * PADDING;
     368        pen.y = cellFrame.origin.y + [nameString size].height + LINE_PADDING + PADDING + BAR_HEIGHT;
     369       
     370        float barWidth = mainWidth + EXTRA_NAME_SHIFT - BUTTONS_TOTAL_WIDTH + PADDING;
    371371       
    372372        if ([fDefaults boolForKey: @"UseAdvancedBar"])
  • trunk/macosx/TorrentTableView.m

    r532 r537  
    2828
    2929#define BUTTON_TO_TOP_REGULAR 33.5
    30 #define BUTTON_TO_TOP_SMALL 19.0
     30#define BUTTON_TO_TOP_SMALL 20.0
    3131
    3232#define BUTTON_WIDTH 14.0
Note: See TracChangeset for help on using the changeset viewer.