Changeset 3636

Show
Ignore:
Timestamp:
04/11/07 00:01:45 (2 years ago)
Author:
timothy
Message:

Get auto-input resizing working again on Leopard.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Panels/JVChatConsolePanel.m

    r3628 r3636  
    464464        float dividerThickness = [splitView dividerThickness]; 
    465465        float maxContentHeight = ( NSHeight( splitViewFrame ) - dividerThickness - 75. ); 
    466         float newContentHeight =  MIN( maxContentHeight, MAX( 25., contentSize.height + 8. ) ); 
     466        float newContentHeight =  MIN( maxContentHeight, MAX( 22., contentSize.height + 8. ) ); 
    467467 
    468468        if( newContentHeight == NSHeight( sendFrame ) ) return; 
     
    487487        [[display enclosingScrollView] setFrame:displayFrame]; 
    488488 
     489        [splitView adjustSubviews]; 
     490 
    489491        if( _scrollerIsAtBottom ) 
    490492                [self performScrollToBottom]; 
    491  
    492         [splitView setNeedsDisplay:YES]; // makes the divider redraw correctly later 
    493493} 
    494494 
  • trunk/Panels/JVDirectChatPanel.m

    r3632 r3636  
    12871287        float dividerThickness = [splitView dividerThickness]; 
    12881288        float maxContentHeight = ( NSHeight( splitViewFrame ) - dividerThickness - 75. ); 
    1289         float newContentHeight =  MIN( maxContentHeight, MAX( 25., contentSize.height + 8. ) ); 
     1289        float newContentHeight =  MIN( maxContentHeight, MAX( 22., contentSize.height + 8. ) ); 
    12901290 
    12911291        if( newContentHeight == NSHeight( sendFrame ) ) return; 
     
    13011301        sendFrame.origin.y = NSHeight( webFrame ) + dividerThickness; 
    13021302 
    1303         JVMarkedScroller *scroller = [display verticalMarkedScroller]; 
    1304         if( ! scroller || [scroller floatValue] >= 0.985 ) _scrollerIsAtBottom = YES; 
    1305         else _scrollerIsAtBottom = NO; 
     1303        _scrollerIsAtBottom = [display scrolledNearBottom]; 
    13061304 
    13071305        // Commit the changes 
     
    13091307        [display setFrame:webFrame]; 
    13101308 
     1309        [splitView adjustSubviews]; 
     1310 
    13111311        if( _scrollerIsAtBottom ) [display scrollToBottom]; 
    1312  
    1313         [splitView setNeedsDisplay:YES]; // makes the divider redraw correctly later 
    13141312} 
    13151313 
     
    13371335 
    13381336- (void) splitViewWillResizeSubviews:(NSNotification *) notification { 
    1339         JVMarkedScroller *scroller = [display verticalMarkedScroller]; 
    1340         if( ! scroller || [scroller floatValue] == 1. ) _scrollerIsAtBottom = YES; 
    1341         else _scrollerIsAtBottom = NO; 
     1337        _scrollerIsAtBottom = [display scrolledNearBottom]; 
    13421338} 
    13431339 
  • trunk/Views/JVStyleView.m

    r3628 r3636  
    670670        int scrollTop = [body integerForDOMProperty:@"scrollTop"]; 
    671671 
    672         // check if we are near the bottom 10 pixels of the chat area 
     672        // check if we are near the bottom 15 pixels of the chat area 
    673673        return ( ( frameHeight + scrollTop ) >= ( scrollHeight - 15 ) ); 
    674674}