mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Bind enabled and title for touch bar buttons by default
This commit is contained in:
1 parent
f795802d60
commit
07599c2ffd
2 files changed
+3
-2
No files matched your search
Vendored
-2
@@ -136,8 +136,6 @@
|
||||
{
|
||||
self.touchBarProvider = [[SUTouchBarProvider alloc] initWithIdentifier:self.className];
|
||||
self.touchBarButton = [self.touchBarProvider addButtonWithButton:self.actionButton];
|
||||
[self.touchBarButton bind:@"title" toObject:self.actionButton withKeyPath:@"title" options:nil];
|
||||
[self.touchBarButton bind:@"enabled" toObject:self.actionButton withKeyPath:@"enabled" options:nil];
|
||||
return self.touchBarProvider.touchBar;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
@@ -54,6 +54,9 @@
|
||||
NSButton *buttonCopy = [NSButton buttonWithTitle:button.title target:button.target action:button.action];
|
||||
buttonCopy.keyEquivalent = button.keyEquivalent;
|
||||
buttonCopy.tag = button.tag;
|
||||
|
||||
[buttonCopy bind:@"title" toObject:button withKeyPath:@"title" options:nil];
|
||||
[buttonCopy bind:@"enabled" toObject:button withKeyPath:@"enabled" options:nil];
|
||||
|
||||
item.view = buttonCopy;
|
||||
[self.touchBarItems addObject:item];
|
||||
|
||||
Reference in new issue
Block a user