mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Make touchBar readwrite/nullable
This commit is contained in:
@@ -377,7 +377,7 @@ bool ScopedDisableResize::disable_resize_ = false;
|
||||
|
||||
- (void)resetTouchBar {
|
||||
bar_items_ = [[NSMutableArray alloc] init];
|
||||
// self.touchBar = nil;
|
||||
self.touchBar = nil;
|
||||
}
|
||||
|
||||
- (NSMutableArray*)identifierArrayFromDicts:(std::vector<mate::PersistentDictionary>)dicts {
|
||||
@@ -435,7 +435,7 @@ bool ScopedDisableResize::disable_resize_ = false;
|
||||
std::map<std::string, mate::PersistentDictionary> new_map;
|
||||
item_id_map = new_map;
|
||||
bar_items_ = [self identifierArrayFromDicts:shell_->GetTouchBarItems()];
|
||||
// self.touchBar = nil;
|
||||
self.touchBar = nil;
|
||||
}
|
||||
|
||||
- (NSTouchBar*)makeTouchBar {
|
||||
|
||||
@@ -121,7 +121,7 @@ static const NSTouchBarItemIdentifier NSTouchBarItemIdentifierOtherItemsProxy =
|
||||
|
||||
@interface NSWindow (TouchBarSDK)
|
||||
|
||||
@property(strong, readonly) NSTouchBar* touchBar;
|
||||
@property(strong, readwrite, nullable) NSTouchBar* touchBar;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user