Revert default_app changes

This commit is contained in:
Kevin Sawicki 2017-02-27 10:38:57 -08:00
parent 52905ae9b3
commit 9272582bd6
2 changed files with 1 additions and 52 deletions

View file

@ -1,4 +1,4 @@
const {app, BrowserWindow, TouchBar} = require('electron')
const {app, BrowserWindow} = require('electron')
const path = require('path')
let mainWindow = null
@ -24,56 +24,5 @@ exports.load = (appUrl) => {
mainWindow = new BrowserWindow(options)
mainWindow.loadURL(appUrl)
mainWindow.focus()
const slider = new (TouchBar.Slider)({
label: 'Slider 123',
minValue: 50,
maxValue: 1000,
initialValue: 300,
change: (newVal) => {
console.log('Slider was changed', newVal, typeof newVal)
}
});
global.slider = slider;
global.button = new (TouchBar.Button)({
label: 'Hello World!',
// image: '/path/to/image',
backgroundColor: 'FF0000',
labelColor: '0000FF',
click: () => {
console.log('Hello World Clicked')
}
});
mainWindow.setTouchBar(new TouchBar([
button,
new (TouchBar.Label)({
label: 'This is a Label'
}),
new (TouchBar.ColorPicker)({
change: (newColor) => {
console.log('Color was changed', newColor)
}
}),
new (TouchBar.PopOver)({
// image: '/path/to/image',
label: 'foo',
showCloseButton: true,
touchBar: new TouchBar([
new (TouchBar.Group)({
items: new TouchBar(
[1, 2, 3].map((i) => new (TouchBar.Button)({
label: `Button ${i}`,
click: () => {
console.log(`Button ${i} (group) Clicked`)
}
}))
)
})
])
}),
slider,
]))
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 120 KiB