Changeset 7758


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

(trunk) last filter button resizing adjustment, I swear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/macosx/Controller.m

    r7756 r7758  
    40814081        //calculate width the buttons can take up
    40824082        const CGFloat allowedWidth = (searchFrame.origin.x - 5.0) - allRect.origin.x;
    4083        
    4084         const CGFloat currentTotal = NSWidth(allRect) + NSWidth(activeRect) + NSWidth(downloadRect) + NSWidth(seedRect)
    4085                                         + NSWidth(pauseRect);
     4083        const CGFloat currentWidth = NSWidth(allRect) + NSWidth(activeRect) + NSWidth(downloadRect) + NSWidth(seedRect)
     4084                                        + NSWidth(pauseRect) + 4.0; //add 4 for space between buttons
     4085        const CGFloat ratio = allowedWidth / currentWidth;
    40864086       
    40874087        //decrease button widths proportionally
    4088         allRect.size.width  = NSWidth(allRect) * (allowedWidth / currentTotal);
    4089         activeRect.size.width = NSWidth(activeRect) * (allowedWidth / currentTotal);
    4090         downloadRect.size.width = NSWidth(downloadRect) * (allowedWidth / currentTotal);
    4091         seedRect.size.width = NSWidth(seedRect) * (allowedWidth / currentTotal);
    4092         pauseRect.size.width = NSWidth(pauseRect) * (allowedWidth / currentTotal);
     4088        allRect.size.width  = NSWidth(allRect) * ratio;
     4089        activeRect.size.width = NSWidth(activeRect) * ratio;
     4090        downloadRect.size.width = NSWidth(downloadRect) * ratio;
     4091        seedRect.size.width = NSWidth(seedRect) * ratio;
     4092        pauseRect.size.width = NSWidth(pauseRect) * ratio;
    40934093    }
    40944094    else;
Note: See TracChangeset for help on using the changeset viewer.