Changeset 3636
- Timestamp:
- 04/11/07 00:01:45 (2 years ago)
- Files:
-
- trunk/Panels/JVChatConsolePanel.m (modified) (2 diffs)
- trunk/Panels/JVDirectChatPanel.m (modified) (4 diffs)
- trunk/Views/JVStyleView.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Panels/JVChatConsolePanel.m
r3628 r3636 464 464 float dividerThickness = [splitView dividerThickness]; 465 465 float maxContentHeight = ( NSHeight( splitViewFrame ) - dividerThickness - 75. ); 466 float newContentHeight = MIN( maxContentHeight, MAX( 2 5., contentSize.height + 8. ) );466 float newContentHeight = MIN( maxContentHeight, MAX( 22., contentSize.height + 8. ) ); 467 467 468 468 if( newContentHeight == NSHeight( sendFrame ) ) return; … … 487 487 [[display enclosingScrollView] setFrame:displayFrame]; 488 488 489 [splitView adjustSubviews]; 490 489 491 if( _scrollerIsAtBottom ) 490 492 [self performScrollToBottom]; 491 492 [splitView setNeedsDisplay:YES]; // makes the divider redraw correctly later493 493 } 494 494 trunk/Panels/JVDirectChatPanel.m
r3632 r3636 1287 1287 float dividerThickness = [splitView dividerThickness]; 1288 1288 float maxContentHeight = ( NSHeight( splitViewFrame ) - dividerThickness - 75. ); 1289 float newContentHeight = MIN( maxContentHeight, MAX( 2 5., contentSize.height + 8. ) );1289 float newContentHeight = MIN( maxContentHeight, MAX( 22., contentSize.height + 8. ) ); 1290 1290 1291 1291 if( newContentHeight == NSHeight( sendFrame ) ) return; … … 1301 1301 sendFrame.origin.y = NSHeight( webFrame ) + dividerThickness; 1302 1302 1303 JVMarkedScroller *scroller = [display verticalMarkedScroller]; 1304 if( ! scroller || [scroller floatValue] >= 0.985 ) _scrollerIsAtBottom = YES; 1305 else _scrollerIsAtBottom = NO; 1303 _scrollerIsAtBottom = [display scrolledNearBottom]; 1306 1304 1307 1305 // Commit the changes … … 1309 1307 [display setFrame:webFrame]; 1310 1308 1309 [splitView adjustSubviews]; 1310 1311 1311 if( _scrollerIsAtBottom ) [display scrollToBottom]; 1312 1313 [splitView setNeedsDisplay:YES]; // makes the divider redraw correctly later1314 1312 } 1315 1313 … … 1337 1335 1338 1336 - (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]; 1342 1338 } 1343 1339 trunk/Views/JVStyleView.m
r3628 r3636 670 670 int scrollTop = [body integerForDOMProperty:@"scrollTop"]; 671 671 672 // check if we are near the bottom 1 0pixels of the chat area672 // check if we are near the bottom 15 pixels of the chat area 673 673 return ( ( frameHeight + scrollTop ) >= ( scrollHeight - 15 ) ); 674 674 }
