Implement popOver item type (woo hoo it worked)

This commit is contained in:
Samuel Attard 2016-11-29 18:00:08 +11:00 committed by Kevin Sawicki
parent 2bc45c8665
commit 269d899a99
3 changed files with 115 additions and 44 deletions

View file

@ -28,6 +28,7 @@ exports.load = (appUrl) => {
mainWindow.setTouchBar(new TouchBar([
new (TouchBar.Button)({
label: 'Hello World!',
// image: '/path/to/image',
backgroundColor: "FF0000",
labelColor: "0000FF",
click: () => {
@ -42,6 +43,19 @@ exports.load = (appUrl) => {
console.log('Color was changed', newColor)
}
}),
new (TouchBar.PopOver)({
// image: '/path/to/image',
label: 'foo',
showCloseButton: true,
touchBar: new TouchBar([
new (TouchBar.Button)({
label: 'Sub Button',
click: () => {
console.log('Sub Button Clicked')
}
})
])
}),
new (TouchBar.Slider)({
label: 'Slider 123',
minValue: 50,