mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 09:09:28 +00:00
Add touchbar support (#862)
* Add touchbar support for the password input * Add touchbar support for entry list * Set NSTouchBarItemIdentifier as static strings * Simplify touchbar initialization in NSTextView * Remove colored buttons in touchbar to adhere to the Human Interface Guidelines * Add search action to touchbar * Create a TouchBarButtonCreator * Enable Touchbar customization * Fix typo * Add customizationLabel to all buttons * Use localised strings instead of hardcoded * Add a popover touchbar for editing * Update localisation * Set the bezel color of the show password button to selected if toggled
This commit is contained in:
committed by
Michael Starke
parent
30a68fc9e3
commit
2d98c480da
@@ -45,6 +45,7 @@
|
||||
#import "MPAutotypeDoctor.h"
|
||||
|
||||
#import "NSApplication+MPAdditions.h"
|
||||
#import "NSTextView+MPTouchBarExtension.h"
|
||||
|
||||
#import "KeePassKit/KeePassKit.h"
|
||||
|
||||
@@ -222,6 +223,13 @@ typedef NS_OPTIONS(NSInteger, MPAppStartupState) {
|
||||
[SUUpdater sharedUpdater];
|
||||
#endif
|
||||
self.startupState |= MPAppStartupStateFinishedLaunch;
|
||||
// Here we just opt-in for allowing our bar to be customized throughout the app.
|
||||
if ([[NSApplication sharedApplication] respondsToSelector:@selector(isAutomaticCustomizeTouchBarMenuItemEnabled)])
|
||||
{
|
||||
if (@available(macOS 10.12.2, *)) {
|
||||
[NSApplication sharedApplication].automaticCustomizeTouchBarMenuItemEnabled = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user