mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-31 07:08:17 +00:00
Enable full size content for better big sur experience
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
<constraint firstItem="3145" firstAttribute="leading" secondItem="2894" secondAttribute="leading" id="3155"/>
|
<constraint firstItem="3145" firstAttribute="leading" secondItem="2894" secondAttribute="leading" id="3155"/>
|
||||||
<constraint firstAttribute="bottom" secondItem="3145" secondAttribute="bottom" id="PjS-Y5-YA6"/>
|
<constraint firstAttribute="bottom" secondItem="3145" secondAttribute="bottom" id="PjS-Y5-YA6"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<point key="canvasLocation" x="-224" y="-890"/>
|
<point key="canvasLocation" x="-349" y="-997"/>
|
||||||
</customView>
|
</customView>
|
||||||
</objects>
|
</objects>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
@property (strong) MPEntryViewController *entryViewController;
|
@property (strong) MPEntryViewController *entryViewController;
|
||||||
@property (strong) MPOutlineViewController *outlineViewController;
|
@property (strong) MPOutlineViewController *outlineViewController;
|
||||||
@property (strong) MPInspectorViewController *inspectorViewController;
|
@property (strong) MPInspectorViewController *inspectorViewController;
|
||||||
|
@property (strong) NSLayoutConstraint *inspectorTopEdgeConstraint;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -39,6 +40,28 @@
|
|||||||
|
|
||||||
- (void)viewWillLayout {
|
- (void)viewWillLayout {
|
||||||
self.splitView.autosaveName = @"SplitView";
|
self.splitView.autosaveName = @"SplitView";
|
||||||
|
[super viewWillLayout];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateViewConstraints {
|
||||||
|
[super updateViewConstraints];
|
||||||
|
if(self.inspectorTopEdgeConstraint) {
|
||||||
|
if(!self.inspectorTopEdgeConstraint.isActive) {
|
||||||
|
self.inspectorTopEdgeConstraint.active = YES;
|
||||||
|
}
|
||||||
|
return; // everything is set up.
|
||||||
|
}
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
|||||||
[super windowDidLoad];
|
[super windowDidLoad];
|
||||||
|
|
||||||
self.window.delegate = self.documentWindowDelegate;
|
self.window.delegate = self.documentWindowDelegate;
|
||||||
|
self.window.styleMask |= NSWindowStyleMaskFullSizeContentView;
|
||||||
[self.window registerForDraggedTypes:@[NSURLPboardType]];
|
[self.window registerForDraggedTypes:@[NSURLPboardType]];
|
||||||
|
|
||||||
MPDocument *document = self.document;
|
MPDocument *document = self.document;
|
||||||
|
|||||||
Reference in New Issue
Block a user