mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 02:49:45 +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
22
MacPass/MPTouchBarButtonCreator.h
Normal file
22
MacPass/MPTouchBarButtonCreator.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// MPTouchBarButtonCreator.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Veit-Hendrik Schlenker on 25.12.18.
|
||||
// Copyright © 2018 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
#import "MPPasswordInputController.h"
|
||||
|
||||
@interface MPTouchBarButtonCreator: NSObject
|
||||
|
||||
+ (NSTouchBarItem *) touchBarButtonWithTitle:(NSString *)title identifier:(NSTouchBarItemIdentifier)identifier target:(id)target selector:(SEL)selector customizationLabel:(NSString *)customizationLabel API_AVAILABLE(macos(10.12.2));
|
||||
|
||||
+ (NSTouchBarItem *) touchBarButtonWithTitleAndImage:(NSString *)title identifier:(NSTouchBarItemIdentifier)identifier image:(NSImage *)image target:(id)target selector:(SEL)selector customizationLabel:(NSString *)customizationLabel API_AVAILABLE(macos(10.12.2));
|
||||
|
||||
+ (NSTouchBarItem *) touchBarButtonWithTitleAndImageAndColor:(NSString *)title identifier:(NSTouchBarItemIdentifier)identifier image:(NSImage *)image color:(NSColor *)color target:(id)target selector:(SEL)selector customizationLabel:(NSString *)customizationLabel API_AVAILABLE(macos(10.12.2));
|
||||
|
||||
+ (NSTouchBarItem *) touchBarButtonWithImage:(NSImage *)image identifier:(NSTouchBarItemIdentifier)identifier target:(id)target selector:(SEL)selector customizationLabel:(NSString *)customizationLabel API_AVAILABLE(macos(10.12.2));
|
||||
|
||||
+ (NSPopoverTouchBarItem *) popoverTouchBarButton:(NSString *)title identifier:(NSTouchBarItemIdentifier)identifier popoverTouchBar:(NSTouchBar *)popoverTouchBar customizationLabel:(NSString *)customizationLabel API_AVAILABLE(macos(10.12.2));
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user