Iveはどこにでも私のbrowserWindowの角を丸くする方法を探しました。電子browserWindowで角を丸くするには?
角を丸くするにはどうすればよいですか?
私はそれを透明にしようとしました。しかし、何も動作しません。
ハーズ私のコード:
/**
* we need to keep a global reference of the window object. If we don't, the
* window will be closed automatically when the js object is garbage collected
*/
let win
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
width: 1800,
height: 1000,
frame: false,
transparent: true,
icon: __dirname + 'icon.png'
})
// and load the index.html of the app.
win.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
}))
// Open the DevTools.
win.webContents.openDevTools()
// Emitted when the window is closed.
win.on('closed', function() {
/**
* Dereference the window object, usually you would store windows in an
* array if your app supports multi windows, this is the time when you
* should delete the corresponding element.
*/
win = null
})
}
'フレーム:偽、半径:[5,5,5,5]'私が読んだものです。 – scoopzilla
これはどこに追加されていますか? @scoopzilla – WorldWideBangers
@scoopzillaそれは動作しません – WorldWideBangers