mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-31 02:28:17 +00:00
Center search in 10.14 and above, keep it "centerish" in older systems
This commit is contained in:
@@ -122,6 +122,11 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
||||
self.toolbar = [[NSToolbar alloc] initWithIdentifier:@"MainWindowToolbar"];
|
||||
self.toolbar.autosavesConfiguration = YES;
|
||||
self.toolbar.allowsUserCustomization = YES;
|
||||
if (@available(macOS 10.14, *)) {
|
||||
self.toolbar.centeredItemIdentifier = MPToolbarItemIdentifierSearch;
|
||||
} else {
|
||||
// to not do any magic here
|
||||
}
|
||||
self.toolbar.delegate = self.toolbarDelegate;
|
||||
self.window.toolbar = self.toolbar;
|
||||
self.toolbarDelegate.toolbar = self.toolbar;
|
||||
|
||||
Reference in New Issue
Block a user