mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-31 02:28:17 +00:00
Added UI setting to control toolbar style
This commit is contained in:
@@ -100,9 +100,17 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
||||
[super windowDidLoad];
|
||||
|
||||
self.window.delegate = self.documentWindowDelegate;
|
||||
//self.window.styleMask |= NSWindowStyleMaskFullSizeContentView;
|
||||
if (@available(macOS 11.0, *)) {
|
||||
self.window.toolbarStyle = NSWindowToolbarStyleExpanded;
|
||||
/* let the user decide how to dipsplay the toolbar */
|
||||
BOOL useUnifiedToolbar = [NSUserDefaults.standardUserDefaults boolForKey:kMPSettingsKeyUseUnifiedToolbar];
|
||||
if(useUnifiedToolbar) {
|
||||
self.window.toolbarStyle = NSWindowToolbarStyleAutomatic;
|
||||
// Do not use full size since the sidebar takes too much room!
|
||||
// self.window.styleMask |= NSWindowStyleMaskFullSizeContentView;
|
||||
}
|
||||
else {
|
||||
self.window.toolbarStyle = NSWindowToolbarStyleExpanded;
|
||||
}
|
||||
}
|
||||
[self.window registerForDraggedTypes:@[NSURLPboardType]];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user