Add Slider item type and add options to the button type
This commit is contained in:
parent
18c7c3ece8
commit
c92c4138a8
5 changed files with 191 additions and 53 deletions
|
@ -28,6 +28,8 @@ exports.load = (appUrl) => {
|
|||
mainWindow.setTouchBar(new TouchBar([
|
||||
new (TouchBar.Button)({
|
||||
label: 'Hello World!',
|
||||
backgroundColor: "DDDDDD",
|
||||
labelColor: "000000",
|
||||
click: () => {
|
||||
console.log('Hello World Clicked')
|
||||
}
|
||||
|
@ -36,10 +38,18 @@ exports.load = (appUrl) => {
|
|||
label: 'This is a Label'
|
||||
}),
|
||||
new (TouchBar.ColorPicker)({
|
||||
change: (...args) => {
|
||||
console.log('Color was changed', ...args)
|
||||
change: (newColor) => {
|
||||
console.log('Color was changed', newColor)
|
||||
}
|
||||
})
|
||||
}),
|
||||
new (TouchBar.Slider)({
|
||||
label: 'Slider 123',
|
||||
minValue: 50,
|
||||
maxValue: 1000,
|
||||
change: (newVal) => {
|
||||
console.log('Slider was changed', newVal, typeof newVal)
|
||||
}
|
||||
}),
|
||||
]))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue