mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Bug fix: the QuickLook panel now really starts its nice morphing animation from the selected row.
Previously it would just start from the top of the file browser outline view every single time. Not very sexy...
This commit is contained in:
@@ -801,7 +801,7 @@
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "GitX" */;
|
||||
buildConfigurationList = 26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "gitx" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* GitTest */;
|
||||
@@ -1507,7 +1507,7 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "GitX" */ = {
|
||||
26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "gitx" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
26FC0A890875C7B200E6366F /* Debug */,
|
||||
|
||||
@@ -13,15 +13,17 @@
|
||||
#import "PBCollapsibleSplitView.h"
|
||||
#import <Quartz/Quartz.h> /* for the QLPreviewPanelDataSource et al. stuff */
|
||||
|
||||
@class PBQLOutlineView;
|
||||
|
||||
@interface PBGitHistoryController : PBViewController <QLPreviewPanelDataSource, QLPreviewPanelDelegate> {
|
||||
IBOutlet NSSearchField *searchField;
|
||||
IBOutlet NSArrayController* commitController;
|
||||
IBOutlet NSTreeController* treeController;
|
||||
IBOutlet NSOutlineView* fileBrowser;
|
||||
IBOutlet NSTableView* commitList;
|
||||
IBOutlet PBQLOutlineView* fileBrowser;
|
||||
IBOutlet PBCollapsibleSplitView *historySplitView;
|
||||
|
||||
IBOutlet id webView;
|
||||
|
||||
int selectedTab;
|
||||
|
||||
PBGitTree* gitTree;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#import "PBGitRevisionCell.h"
|
||||
#import "PBCommitList.h"
|
||||
#import "ApplicationController.h"
|
||||
#import "PBQLOutlineView.h"
|
||||
|
||||
@implementation PBGitHistoryController
|
||||
@synthesize selectedTab, webCommit, rawCommit, gitTree, commitController;
|
||||
@@ -67,20 +68,20 @@
|
||||
// This delegate method provides the rect on screen from which the panel will zoom.
|
||||
- (NSRect)previewPanel:(QLPreviewPanel *)panel sourceFrameOnScreenForPreviewItem:(id <QLPreviewItem>)item
|
||||
{
|
||||
NSInteger index = [[treeController selectedObjects] indexOfObject:item];
|
||||
NSInteger index = [fileBrowser rowForItem:[[treeController selectedNodes] objectAtIndex:0]];
|
||||
if (index == NSNotFound) {
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
NSRect iconRect = [fileBrowser frameOfOutlineCellAtRow:index];
|
||||
NSRect iconRect = [fileBrowser frameOfCellAtColumn:0 row:index];
|
||||
|
||||
// check that the icon rect is visible on screen
|
||||
// NSRect visibleRect = [fileBrowser visibleRect];
|
||||
//
|
||||
// if (!NSIntersectsRect(visibleRect, iconRect)) {
|
||||
// return NSZeroRect;
|
||||
// }
|
||||
NSRect visibleRect = [fileBrowser visibleRect];
|
||||
|
||||
if (!NSIntersectsRect(visibleRect, iconRect)) {
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
// convert icon rect to screen coordinates
|
||||
iconRect = [fileBrowser convertRectToBase:iconRect];
|
||||
iconRect.origin = [[fileBrowser window] convertBaseToScreen:iconRect.origin];
|
||||
|
||||
Reference in New Issue
Block a user