diff --git a/MacPass/DocumentSplitView.xib b/MacPass/DocumentSplitView.xib index d61c3950..3abdaa6d 100644 --- a/MacPass/DocumentSplitView.xib +++ b/MacPass/DocumentSplitView.xib @@ -1,8 +1,8 @@ - + - + @@ -13,9 +13,8 @@ - + - diff --git a/MacPass/MPDocumentSplitViewController.m b/MacPass/MPDocumentSplitViewController.m index 37e6730a..dfffa177 100644 --- a/MacPass/MPDocumentSplitViewController.m +++ b/MacPass/MPDocumentSplitViewController.m @@ -17,7 +17,6 @@ @property (strong) MPEntryViewController *entryViewController; @property (strong) MPOutlineViewController *outlineViewController; @property (strong) MPInspectorViewController *inspectorViewController; -@property (strong) NSLayoutConstraint *inspectorTopEdgeConstraint; @end @@ -43,7 +42,7 @@ [super viewWillLayout]; } -- (void)updateViewConstraints { +/*- (void)updateViewConstraints { [super updateViewConstraints]; if(self.inspectorTopEdgeConstraint) { if(!self.inspectorTopEdgeConstraint.isActive) { @@ -51,18 +50,18 @@ } return; // everything is set up. } - /* setup the constraint if needed */ + // setup the constraint if needed NSWindow *window = self.view.window; if(!window) { return; } NSSplitViewItem *inspector = [self splitViewItemForViewController:self.inspectorViewController]; - if(inspector) { - self.inspectorTopEdgeConstraint = [NSLayoutConstraint constraintWithItem:inspector.viewController.view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:window.contentLayoutGuide attribute:NSLayoutAttributeTop multiplier:1 constant:0]; - - self.inspectorTopEdgeConstraint.active = YES; - } -} + NSSplitViewItem *entries = [self splitViewItemForViewController:self.entryViewController]; + NSSplitViewItem *outline = [self splitViewItemForViewController:self.outlineViewController]; + [inspector.viewController.view.topAnchor constraintEqualToAnchor:[window.contentLayoutGuide topAnchor]].active = YES; + [entries.viewController.view.topAnchor constraintEqualToAnchor:[window.contentLayoutGuide topAnchor]].active = YES; + [outline.viewController.view.topAnchor constraintEqualToAnchor:[window.contentLayoutGuide topAnchor]].active = YES; +}*/ - (void)viewDidLoad { [super viewDidLoad]; diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index bea7be16..59efcaf7 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -100,7 +100,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword); [super windowDidLoad]; self.window.delegate = self.documentWindowDelegate; - self.window.styleMask |= NSWindowStyleMaskFullSizeContentView; + //self.window.styleMask |= NSWindowStyleMaskFullSizeContentView; if (@available(macOS 11.0, *)) { self.window.toolbarStyle = NSWindowToolbarStyleExpanded; }