Thumbnail toolbars

From Windows 7 onward, the platform provides a feature called thumbnail toolbars. You don't have to switch between the windows if you are busy with other applications. Thumbnail toolbar allows you to interact with a pinned site without opening it first. You can add custom command buttons, image, and video into the thumbnail toolbar.

The following code adds two command buttons into the thumbnail toolbar:

const { BrowserWindow } = require('electron');
const path = require('path');

let win = new BrowserWindow({
width: 800,
height: 600
})

win.setThumbarButtons([
{
tooltip: 'button1',
icon: path.join(__dirname, 'button1.png'),
click () { console.log('button1 clicked') }
},
{
tooltip: 'button2',
icon: path.join(__dirname, 'button2.png'),
flags: ['enabled', 'dismissonclick'],
click () { console.log('button2 clicked.') }
}
])
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.192.247