Ignore:
Timestamp:
Jul 23, 2006, 7:22:24 PM (16 years ago)
Author:
livings124
Message:

simplify rect width and height measurements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r676 r678  
    4848#define TORRENT_TABLE_VIEW_DATA_TYPE    @"TorrentTableViewDataType"
    4949
    50 #define ROW_HEIGHT_REGULAR 65.0
    51 #define ROW_HEIGHT_SMALL 40.0
     50#define ROW_HEIGHT_REGULAR  65.0
     51#define ROW_HEIGHT_SMALL    40.0
     52#define WINDOW_REGULAR_WIDTH       468.0
    5253
    5354#define WEBSITE_URL @"http://transmission.m0k.org/"
     
    151152   
    152153    [contentView addSubview: fFilterBar];
    153     [fFilterBar setFrameOrigin: NSMakePoint(0, [contentView frame].origin.y + [contentView frame].size.height)];
     154    [fFilterBar setFrameOrigin: NSMakePoint(0, NSMaxY([contentView frame]))];
    154155   
    155156    [self showFilterBar: [fDefaults boolForKey: @"FilterBar"] animate: NO];
     
    164165   
    165166    [contentView addSubview: fStatusBar];
    166     [fStatusBar setFrameOrigin: NSMakePoint(0, [contentView frame].origin.y + [contentView frame].size.height)];
     167    [fStatusBar setFrameOrigin: NSMakePoint(0, NSMaxY([contentView frame]))];
    167168    [self showStatusBar: [fDefaults boolForKey: @"StatusBar"] animate: NO];
    168169   
     
    21202121                    : [self windowFrameForAmount: [fFilteredTorrents count]];
    21212122   
    2122     frame.size.width = [fDefaults boolForKey: @"SmallView"] ? [fWindow minSize].width : 468.0;
     2123    frame.size.width = [fDefaults boolForKey: @"SmallView"] ? [fWindow minSize].width : WINDOW_REGULAR_WIDTH;
    21232124    return frame;
    21242125}
     
    21872188    //hide search filter if it overlaps filter buttons
    21882189    NSRect buttonFrame = [fPauseFilterButton frame];
    2189     if (buttonFrame.origin.x + buttonFrame.size.width + 2.0 > [fSearchFilterField frame].origin.x)
     2190    if (NSMaxX(buttonFrame) + 2.0 > [fSearchFilterField frame].origin.x)
    21902191    {
    21912192        if (![fSearchFilterField isHidden])
Note: See TracChangeset for help on using the changeset viewer.