Use NSTouchBar itemForIdentifier to lookup existing item

This commit is contained in:
Kevin Sawicki 2017-03-02 10:23:24 -08:00
parent 8d716e8b17
commit d1edd80ef8
4 changed files with 85 additions and 64 deletions

View file

@ -147,7 +147,7 @@ TouchBar.Group = class TouchBarGroup extends TouchBarItem {
this.type = 'group'
this.child = config.items
if (!(this.child instanceof TouchBar)) {
this.child = new TouchBar(this.items)
this.child = new TouchBar(this.child)
}
}
}
@ -176,7 +176,7 @@ TouchBar.Popover = class TouchBarPopover extends TouchBarItem {
this.showCloseButton = config.showCloseButton
this.child = config.items
if (!(this.child instanceof TouchBar)) {
this.child = new TouchBar(this.items)
this.child = new TouchBar(this.child)
}
}
}