Changeset 1009


Ignore:
Timestamp:
Oct 15, 2006, 7:24:08 PM (15 years ago)
Author:
livings124
Message:

if there's not enough room to allow the window to expand to show the status/filter bars, first make the window smaller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r1005 r1009  
    17661766    if (!show)
    17671767        heightChange *= -1;
     1768   
     1769    //allow bar to show even if not enough room
     1770    if (show && ![fDefaults boolForKey: @"AutoSize"])
     1771    {
     1772        float maxHeight = [[fWindow screen] visibleFrame].size.height - heightChange;
     1773        if (frame.size.height > maxHeight)
     1774        {
     1775            float change = maxHeight - frame.size.height;
     1776            frame.size.height += change;
     1777            frame.origin.y -= change;
     1778           
     1779            [fWindow setFrame: frame display: NO animate: NO];
     1780        }
     1781    }
    17681782
    17691783    frame.size.height += heightChange;
     
    18211835    if (!show)
    18221836        heightChange *= -1;
     1837   
     1838    //allow bar to show even if not enough room
     1839    if (show && ![fDefaults boolForKey: @"AutoSize"])
     1840    {
     1841        float maxHeight = [[fWindow screen] visibleFrame].size.height - heightChange;
     1842        if (frame.size.height > maxHeight)
     1843        {
     1844            float change = maxHeight - frame.size.height;
     1845            frame.size.height += change;
     1846            frame.origin.y -= change;
     1847           
     1848            [fWindow setFrame: frame display: NO animate: NO];
     1849        }
     1850    }
    18231851
    18241852    frame.size.height += heightChange;
     
    18311859    [fScrollView setAutoresizingMask: 0];
    18321860   
    1833     [fWindow setFrame: frame display: YES animate: animate]; 
     1861    [fWindow setFrame: frame display: YES animate: animate];
    18341862   
    18351863    //re-enable autoresize
Note: See TracChangeset for help on using the changeset viewer.