@@ -81,7 +81,6 @@ - (void)awakeFromNib
81
81
// Add a menu that allows a user to select which columns to view
82
82
[[commitList headerView ] setMenu: [self tableColumnMenu ]];
83
83
84
- [historySplitView setTopMin: 58.0 andBottomMin: 100.0 ];
85
84
[historySplitView setHidden: YES ];
86
85
[self performSelector: @selector (restoreSplitViewPositiion ) withObject: nil afterDelay: 0 ];
87
86
@@ -620,54 +619,7 @@ - (NSArray *)menuItemsForPaths:(NSArray *)paths
620
619
621
620
- (BOOL )splitView : (NSSplitView *)splitView canCollapseSubview : (NSView *)subview
622
621
{
623
- return TRUE ;
624
- }
625
-
626
- - (BOOL )splitView : (NSSplitView *)splitView shouldCollapseSubview : (NSView *)subview forDoubleClickOnDividerAtIndex : (NSInteger )dividerIndex
627
- {
628
- NSUInteger index = [[splitView subviews ] indexOfObject: subview];
629
- // this method (and canCollapse) are called by the splitView to decide how to collapse on double-click
630
- // we compare our two subviews, so that always the smaller one is collapsed.
631
- if ([[[splitView subviews ] objectAtIndex: index] frame ].size .height < [[[splitView subviews ] objectAtIndex: ((index+1 )%2 )] frame ].size .height ) {
632
- return TRUE ;
633
- }
634
- return FALSE ;
635
- }
636
-
637
- - (CGFloat)splitView : (NSSplitView *)splitView constrainMinCoordinate : (CGFloat)proposedMin ofSubviewAt : (NSInteger )dividerIndex
638
- {
639
- return historySplitView.topViewMin ;
640
- }
641
-
642
- - (CGFloat)splitView : (NSSplitView *)splitView constrainMaxCoordinate : (CGFloat)proposedMax ofSubviewAt : (NSInteger )dividerIndex
643
- {
644
- return [splitView frame ].size .height - [splitView dividerThickness ] - historySplitView.bottomViewMin ;
645
- }
646
-
647
- // while the user resizes the window keep the upper (history) view constant and just resize the lower view
648
- // unless the lower view gets too small
649
- - (void )splitView : (NSSplitView *)splitView resizeSubviewsWithOldSize : (NSSize )oldSize
650
- {
651
- NSRect newFrame = [splitView frame ];
652
-
653
- float dividerThickness = [splitView dividerThickness ];
654
-
655
- NSView *upperView = [[splitView subviews ] objectAtIndex: 0 ];
656
- NSRect upperFrame = [upperView frame ];
657
- upperFrame.size .width = newFrame.size .width ;
658
-
659
- if ((newFrame.size .height - upperFrame.size .height - dividerThickness) < historySplitView.bottomViewMin ) {
660
- upperFrame.size .height = newFrame.size .height - historySplitView.bottomViewMin - dividerThickness;
661
- }
662
-
663
- NSView *lowerView = [[splitView subviews ] objectAtIndex: 1 ];
664
- NSRect lowerFrame = [lowerView frame ];
665
- lowerFrame.origin .y = upperFrame.size .height + dividerThickness;
666
- lowerFrame.size .height = newFrame.size .height - lowerFrame.origin .y ;
667
- lowerFrame.size .width = newFrame.size .width ;
668
-
669
- [upperView setFrame: upperFrame];
670
- [lowerView setFrame: lowerFrame];
622
+ return NO ;
671
623
}
672
624
673
625
// NSSplitView does not save and restore the position of the SplitView correctly so do it manually
0 commit comments