electron transparent: true, isMaximized 不起作用

electron13 transparent为true时候isMaximized不起作用

 

electron13 transparent为true时候isMaximized不起作用,网上好多人说总是返回false 等。

后来看gitub 上说17版本已经修复,但是目前项目不能升级electron ,还要透明主题,在为难时候发现一个大佬写了插件,解决:

https://www.npmjs.com/package/electron-frameless-window-plugin

npm i  electron-frameless-window-plugin
// main.js
const { app } = require('electron')
const { plugin } = require('electron-frameless-window-plugin')
 
app.on('ready', () => {
  ...
})
 
plugin({
  setGlobal: true
}) // apply to each window

 

posted @ 2022-12-16 16:59  星涑  阅读(216)  评论(0编辑  收藏  举报