2017-01-20 18 views
1

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 
 
    }) 
 
}

+0

'フレーム:偽、半径:[5,5,5,5]'私が読んだものです。 – scoopzilla

+0

これはどこに追加されていますか? @scoopzilla – WorldWideBangers

+0

@scoopzillaそれは動作しません – WorldWideBangers

答えて

0
function createWindow() { 
    // Create the browser window. 
    win = new BrowserWindow({ 
     width: 1800, 
     height: 1000, 
     frame: false, 
     radii: [5,5,5,5], 
     transparent: true, 
     icon: __dirname + 'icon.png' 
}) 
+0

これは何もしません。私は角を丸くしようとしているので。まだ丸められていません。 – WorldWideBangers

+0

それから私は何かが欠けているに違いありません。ごめんなさい :( – scoopzilla

関連する問題