From 14b9fd8d8fdb5ac789af8af818b638506d204239 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Wed, 16 Mar 2022 15:20:19 +0100 Subject: [PATCH] Fixed clipped button in Icon Editor Set monospaced font on password attribute editor --- MacPass/MPDocumentSplitViewController.m | 9 ++++----- MacPass/MPEntryAttributeViewController.m | 5 ++++- MacPass/MPEntryAttributeViewController.xib | 14 +++++++------- MacPass/MPNodeIconViewController.xib | 6 +++--- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/MacPass/MPDocumentSplitViewController.m b/MacPass/MPDocumentSplitViewController.m index 1474dc28..8ed4497a 100644 --- a/MacPass/MPDocumentSplitViewController.m +++ b/MacPass/MPDocumentSplitViewController.m @@ -107,20 +107,19 @@ } - (id)supplementalTargetForAction:(SEL)action sender:(id)sender { - NSLog(@"First Responder:%@",self.view.window.firstResponder); - NSLog(@"Looking for target for action:%@", NSStringFromSelector(action)); + // NSLog(@"Looking for target for action:%@", NSStringFromSelector(action)); for(NSViewController *childViewController in self.childViewControllers) { if([childViewController respondsToSelector:action]) { - NSLog(@"Found target:%@ for action:%@", childViewController, NSStringFromSelector(action)); + // NSLog(@"Found target:%@ for action:%@", childViewController, NSStringFromSelector(action)); return childViewController; } else { id target = [childViewController supplementalTargetForAction:action sender:sender]; if(!target) { - NSLog(@"No target for action:%@", NSStringFromSelector(action)); + // NSLog(@"No target for action:%@", NSStringFromSelector(action)); continue; } - NSLog(@"Found supplemental target:%@ for action:%@", target, NSStringFromSelector(action)); + // NSLog(@"Found supplemental target:%@ for action:%@", target, NSStringFromSelector(action)); return target; } } diff --git a/MacPass/MPEntryAttributeViewController.m b/MacPass/MPEntryAttributeViewController.m index 1c8eb7b0..58cae97c 100644 --- a/MacPass/MPEntryAttributeViewController.m +++ b/MacPass/MPEntryAttributeViewController.m @@ -80,6 +80,8 @@ NSString *nameForDefaultKey(NSString *key) { NSConditionallySetsHiddenBindingOption : @(NO), NSConditionallySetsEnabledBindingOption : @(NO), NSConditionallySetsEditableBindingOption : @(NO) }; + + NSString *valueKeyPath = [NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(value))]; if(self.isDefaultAttributeEditor) { valueKeyPath = [NSString stringWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)),NSStringFromSelector(@selector(entry)), NSStringFromSelector(self.attributeSelector)]; @@ -98,8 +100,9 @@ NSString *nameForDefaultKey(NSString *key) { } if(self.isPasswordAttributeEditor) { self.toggleProtectedButton.image = [NSImage imageNamed:NSImageNameQuickLookTemplate]; + NSFont *font = [NSFont fontWithName:@"Menlo-Regular" size:13.0]; + self.valueTextField.font = font; // TODO: setup pretty password value transformer - // TODO: setup Monospaced Font } [self updateValuesAndEditing]; } diff --git a/MacPass/MPEntryAttributeViewController.xib b/MacPass/MPEntryAttributeViewController.xib index c02d636a..10643ce5 100644 --- a/MacPass/MPEntryAttributeViewController.xib +++ b/MacPass/MPEntryAttributeViewController.xib @@ -23,7 +23,7 @@ - + @@ -35,10 +35,10 @@ - + - + @@ -49,21 +49,21 @@