@@ -594,6 +594,7 @@ - (void) checkoutFiles:(id)sender
594594
595595- (void ) diffFilesAction : (id )sender
596596{
597+ /* TODO: Move that to the document */
597598 [PBDiffWindowController showDiffWindowWithFiles: [sender representedObject ] fromCommit: self .selectedCommits.firstObject diffCommit: nil ];
598599}
599600
@@ -673,32 +674,6 @@ - (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)pr
673674 return [splitView frame ].size .height - [splitView dividerThickness ] - historySplitView.bottomViewMin ;
674675}
675676
676- // while the user resizes the window keep the upper (history) view constant and just resize the lower view
677- // unless the lower view gets too small
678- - (void )splitView : (NSSplitView *)splitView resizeSubviewsWithOldSize : (NSSize )oldSize
679- {
680- NSRect newFrame = [splitView frame ];
681-
682- float dividerThickness = [splitView dividerThickness ];
683-
684- NSView *upperView = [[splitView subviews ] objectAtIndex: 0 ];
685- NSRect upperFrame = [upperView frame ];
686- upperFrame.size .width = newFrame.size .width ;
687-
688- if ((newFrame.size .height - upperFrame.size .height - dividerThickness) < historySplitView.bottomViewMin ) {
689- upperFrame.size .height = newFrame.size .height - historySplitView.bottomViewMin - dividerThickness;
690- }
691-
692- NSView *lowerView = [[splitView subviews ] objectAtIndex: 1 ];
693- NSRect lowerFrame = [lowerView frame ];
694- lowerFrame.origin .y = upperFrame.size .height + dividerThickness;
695- lowerFrame.size .height = newFrame.size .height - lowerFrame.origin .y ;
696- lowerFrame.size .width = newFrame.size .width ;
697-
698- [upperView setFrame: upperFrame];
699- [lowerView setFrame: lowerFrame];
700- }
701-
702677// NSSplitView does not save and restore the position of the SplitView correctly so do it manually
703678- (void )saveSplitViewPosition
704679{
@@ -841,8 +816,8 @@ - (NSRect)previewPanel:(id)panel sourceFrameOnScreenForPreviewItem:(id <QLPrevie
841816 }
842817
843818 // convert icon rect to screen coordinates
844- iconRect = [fileBrowser convertRectToBase : iconRect];
845- iconRect. origin = [[ fileBrowser window ] convertBaseToScreen : iconRect.origin ];
819+ iconRect = [fileBrowser.window.contentView convertRect : iconRect fromView: fileBrowser ];
820+ iconRect = [fileBrowser. window convertRectToScreen : iconRect];
846821
847822 return iconRect;
848823}
0 commit comments