From cbcd9fb75162c045ff4c444c8ff09976ee2ea8ae Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Mon, 27 Aug 2018 17:10:55 +0200 Subject: [PATCH] Enable automatic row height for 10.13 in custom fields. Fixed #27 --- MacPass/Base.lproj/EntryInspectorView.xib | 20 ++++++++++---------- MacPass/MPEntryInspectorViewController.m | 5 +++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/MacPass/Base.lproj/EntryInspectorView.xib b/MacPass/Base.lproj/EntryInspectorView.xib index a3251099..423f5f75 100644 --- a/MacPass/Base.lproj/EntryInspectorView.xib +++ b/MacPass/Base.lproj/EntryInspectorView.xib @@ -1,8 +1,8 @@ - + - + @@ -46,7 +46,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -467,7 +467,7 @@ - + @@ -594,7 +594,7 @@ - + @@ -603,7 +603,7 @@ - + @@ -805,7 +805,7 @@ - + @@ -825,7 +825,7 @@ - + diff --git a/MacPass/MPEntryInspectorViewController.m b/MacPass/MPEntryInspectorViewController.m index 9b5ad899..f5bd1df3 100644 --- a/MacPass/MPEntryInspectorViewController.m +++ b/MacPass/MPEntryInspectorViewController.m @@ -137,6 +137,11 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { self.customFieldsTableView.translatesAutoresizingMaskIntoConstraints = NO; NSView *customFieldTableView = self.customFieldsTableView; [self.customFieldsTableView.enclosingScrollView removeFromSuperviewWithoutNeedingDisplay]; + if (@available(macOS 10.13, *)) { + self.customFieldsTableView.usesAutomaticRowHeights = YES; + } else { + // Fallback on earlier versions + } [self.generalView addSubview:customFieldTableView];