feat: allow TouchBarButton instances to be disabled (#20945)

* feat: allow TouchBarButton instances to be disabled

* Update touch-bar-button.md
This commit is contained in:
Samuel Attard 2019-11-05 15:56:36 -08:00 committed by GitHub
parent 9a198e8ef4
commit 5b7382765c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View file

@ -384,6 +384,10 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
button.imagePosition = NSImageOverlaps;
}
}
bool enabled = true;
settings.Get("enabled", &enabled);
[button setEnabled:enabled];
}
- (NSTouchBarItem*)makeLabelForID:(NSString*)id