diff --git a/GitUp/Application/Base.lproj/Document.xib b/GitUp/Application/Base.lproj/Document.xib index 1871b9b1..86721f74 100644 --- a/GitUp/Application/Base.lproj/Document.xib +++ b/GitUp/Application/Base.lproj/Document.xib @@ -278,7 +278,7 @@ - + - + - + @@ -57,17 +57,44 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -80,7 +107,7 @@ - + @@ -88,11 +115,11 @@ - + - + @@ -116,10 +143,6 @@ - - - - @@ -161,6 +184,14 @@ + + + + + + + + diff --git a/GitUp/Application/Document.m b/GitUp/Application/Document.m index 9b45a118..2af46e95 100644 --- a/GitUp/Application/Document.m +++ b/GitUp/Application/Document.m @@ -1774,16 +1774,28 @@ - (IBAction)toggleTags:(id)sender { - (IBAction)toggleSnapshots:(id)sender { if (_snapshotsView.superview) { + [self setSnapshotToggleState:NSOffState]; _mapViewController.previewHistory = nil; [self _removeSideView:_snapshotsView completion:NULL]; [_mainWindow makeFirstResponder:_mapViewController.preferredFirstResponder]; } else { + [self setSnapshotToggleState:NSOnState]; [_mainWindow makeFirstResponder:nil]; // Force end-editing in search field to avoid close button remaining around [self _addSideView:_snapshotsView withIdentifier:kSideViewIdentifier_Snapshots completion:NULL]; [_mainWindow makeFirstResponder:_snapshotListViewController.preferredFirstResponder]; } } +- (void)setSnapshotToggleState:(NSControlStateValue)state { + NSButton* button = (NSButton*)_snapshotsItem.view; + if (![button isKindOfClass:[NSButton class]]) { + XLOG_ERROR(@"This used to be a button, update this function if the layout has changed."); + return; + } + + [button setState:state]; +} + - (IBAction)toggleReflog:(id)sender { if (_reflogView.superview) { _mapViewController.forceShowAllTips = NO; diff --git a/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib b/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib index eeeb1ec7..64079689 100644 --- a/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib +++ b/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib @@ -1,8 +1,8 @@ - + - + @@ -225,7 +225,7 @@ DQ - + diff --git a/GitUpKit/Views/Base.lproj/GICommitRewriterViewController.xib b/GitUpKit/Views/Base.lproj/GICommitRewriterViewController.xib index afbe4c5a..cc309b86 100644 --- a/GitUpKit/Views/Base.lproj/GICommitRewriterViewController.xib +++ b/GitUpKit/Views/Base.lproj/GICommitRewriterViewController.xib @@ -1,8 +1,8 @@ - + - + @@ -20,19 +20,19 @@ - + - + - + - + @@ -41,34 +41,34 @@ - + - + - + - + - + - + - - - + - + @@ -123,12 +123,13 @@ DQ + - + @@ -137,7 +138,7 @@ DQ - + @@ -155,7 +156,7 @@ DQ - + @@ -176,7 +177,7 @@ DQ - + @@ -185,7 +186,7 @@ DQ - - - - - - + @@ -510,7 +510,7 @@ DQ - - -