From 8dee783c4c1d57350c35e949fd1469f208e80715 Mon Sep 17 00:00:00 2001 From: michael starke Date: Sat, 15 Mar 2014 17:15:45 +0100 Subject: [PATCH] Removed dark Trash gradient as the button text wasn't readable Fixed issue with creating entries form templates --- MacPass/MPContextBarViewController.m | 13 ++++++++----- MacPass/MPDocument.m | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/MacPass/MPContextBarViewController.m b/MacPass/MPContextBarViewController.m index b0849b92..5ad208d3 100644 --- a/MacPass/MPContextBarViewController.m +++ b/MacPass/MPContextBarViewController.m @@ -60,11 +60,14 @@ typedef NS_ENUM(NSUInteger, MPContextTab) { self.historyBar.activeGradient = [[NSGradient alloc] initWithStartingColor:[NSColor redColor] endingColor:[NSColor greenColor]]; - NSArray *activeColors = @[[NSColor colorWithCalibratedWhite:0.2 alpha:1],[NSColor colorWithCalibratedWhite:0.4 alpha:1]]; - NSArray *inactiveColors = @[[NSColor colorWithCalibratedWhite:0.3 alpha:1],[NSColor colorWithCalibratedWhite:0.6 alpha:1]]; - self.trashBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors]; - self.trashBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors]; - [[self view] bind:NSSelectedIndexBinding toObject:self withKeyPath:@"activeTab" options:nil]; + /* + NSArray *activeColors = @[[NSColor colorWithCalibratedWhite:0.2 alpha:1],[NSColor colorWithCalibratedWhite:0.4 alpha:1]]; + NSArray *inactiveColors = @[[NSColor colorWithCalibratedWhite:0.3 alpha:1],[NSColor colorWithCalibratedWhite:0.6 alpha:1]]; + self.trashBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors]; + self.trashBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors]; + */ + [[self view] bind:NSSelectedIndexBinding toObject:self withKeyPath:@"activeTab" options:nil]; + self.emptyTrashButton.textColor = [NSColor whiteColor]; diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index a3fd738b..ad19003a 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -532,7 +532,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey return; // sender cannot provide usefull data } id obj = [sender representedObject]; - if([obj isKindOfClass:[NSUUID class]]) { + if(![obj isKindOfClass:[NSUUID class]]) { return; // sender cannot provide NSUUID } NSUUID *entryUUID = [sender representedObject];