Ignore:
Timestamp:
Jan 19, 2009, 10:28:25 PM (12 years ago)
Author:
livings124
Message:

(trunk) last filter button resizing adjustment, I swear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r7755 r7757  
    39673967        //calculate width the buttons can take up
    39683968        const CGFloat allowedWidth = (searchFrame.origin.x - 5.0) - allRect.origin.x;
    3969        
    3970         const CGFloat currentTotal = NSWidth(allRect) + NSWidth(activeRect) + NSWidth(downloadRect) + NSWidth(seedRect)
    3971                                         + NSWidth(pauseRect);
     3969        const CGFloat currentWidth = NSWidth(allRect) + NSWidth(activeRect) + NSWidth(downloadRect) + NSWidth(seedRect)
     3970                                        + NSWidth(pauseRect) + 4.0; //add 4 for space between buttons
     3971        const CGFloat ratio = allowedWidth / currentWidth;
    39723972       
    39733973        //decrease button widths proportionally
    3974         allRect.size.width  = NSWidth(allRect) * (allowedWidth / currentTotal);
    3975         activeRect.size.width = NSWidth(activeRect) * (allowedWidth / currentTotal);
    3976         downloadRect.size.width = NSWidth(downloadRect) * (allowedWidth / currentTotal);
    3977         seedRect.size.width = NSWidth(seedRect) * (allowedWidth / currentTotal);
    3978         pauseRect.size.width = NSWidth(pauseRect) * (allowedWidth / currentTotal);
     3974        allRect.size.width  = NSWidth(allRect) * ratio;
     3975        activeRect.size.width = NSWidth(activeRect) * ratio;
     3976        downloadRect.size.width = NSWidth(downloadRect) * ratio;
     3977        seedRect.size.width = NSWidth(seedRect) * ratio;
     3978        pauseRect.size.width = NSWidth(pauseRect) * ratio;
    39793979    }
    39803980    else;
Note: See TracChangeset for help on using the changeset viewer.