Ignore:
Timestamp:
Jun 20, 2006, 12:36:51 AM (16 years ago)
Author:
livings124
Message:

Better resizing behavior.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r397 r402  
    6767    frame.size.height += difference;
    6868    [window setFrame: frame display: YES];
    69     [window setMinSize: NSMakeSize( MIN_WINDOW_WIDTH, frame.size.height )];
    70     [window setMaxSize: NSMakeSize( MAX_WINDOW_WIDTH, frame.size.height )];
     69   
     70    [window setMinSize: NSMakeSize(MIN_WINDOW_WIDTH, frame.size.height)];
     71    [window setMaxSize: NSMakeSize(MAX_WINDOW_WIDTH, frame.size.height)];
    7172}
    7273
     
    313314}
    314315
     316- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame
     317{
     318    NSPoint windowOrigin = [window frame].origin;
     319    NSSize minSize = [window minSize];
     320   
     321    return NSMakeRect(windowOrigin.x, windowOrigin.y, minSize.width, minSize.height);
     322}
     323
    315324- (void) tabView: (NSTabView *) tabView didSelectTabViewItem: (NSTabViewItem *) tabViewItem
    316325{
     
    337346    [window setFrame: frame display: YES animate: YES];
    338347    [view setHidden: NO];
    339     [window setMinSize: NSMakeSize( MIN_WINDOW_WIDTH, frame.size.height )];
    340     [window setMaxSize: NSMakeSize( MAX_WINDOW_WIDTH, frame.size.height )];
     348   
     349    [window setMinSize: NSMakeSize(MIN_WINDOW_WIDTH, frame.size.height)];
     350    [window setMaxSize: NSMakeSize(MAX_WINDOW_WIDTH, frame.size.height)];
    341351}
    342352
Note: See TracChangeset for help on using the changeset viewer.