Adium

Changeset 23407

Show
Ignore:
Timestamp:
05/12/2008 11:27:24 PM (7 months ago)
Author:
evands
Message:

Fixed standard contact list search with contents of less height than the filter bar itself, such as a single collapsed group row. Fixes #9516

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/AIStandardListWindowController.m

    r23406 r23407  
    887887 
    888888        // Contact list resizing 
    889         if (filterBarIsVisible) { 
     889        if (filterBarIsVisible) {                       
    890890                targetFrame.size.height = NSHeight(targetFrame) + NSHeight([filterBarView bounds]); 
     891 
    891892        } else { 
     893                /* We can only have a height less than the filter bar view if we are autosizing vertically, as 
     894                 * there is a minimum height otherwise which is larger.  We can therefore increase our window size to allow space 
     895                 * for the filter bar with impunity and without undoing this when hiding the bar, as the autosizing of the contact 
     896                 * list will get us back to the right size later. 
     897                 */ 
     898                if (NSHeight(targetFrame) < (NSHeight([filterBarView bounds]) * 2)) { 
     899                        NSRect windowFrame = [[targetView window] frame]; 
     900                         
     901                        [[targetView window] setFrame:NSMakeRect(NSMinX(windowFrame), NSMinY(windowFrame) - NSHeight([filterBarView bounds]), 
     902                                                                                                         NSWidth(windowFrame), NSHeight(windowFrame) + NSHeight([filterBarView bounds])) 
     903                                                                  display:NO 
     904                                                                  animate:NO]; 
     905                         
     906                        targetFrame = [targetView frame];                        
     907                } 
     908                         
    892909                targetFrame.size.height = NSHeight(targetFrame) - NSHeight([filterBarView bounds]); 
    893910        } 
     
    911928        targetViewDict = [NSDictionary dictionaryWithObjectsAndKeys:targetView, NSViewAnimationTargetKey, 
    912929                                          [NSValue valueWithRect:targetFrame], NSViewAnimationEndFrameKey, nil]; 
    913          
     930 
    914931        filterBarAnimation = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:targetViewDict, filterBarDict, nil]]; 
    915932        [filterBarAnimation setDuration:duration];