forked from miao-moe/QZMusic_PC
feat: 微调界面;设置最小宽度+高度;修复播放器非全屏不显示的问题
This commit is contained in:
@@ -30,13 +30,22 @@ function createWindow() {
|
||||
win = new BrowserWindow({
|
||||
// 🔧 禁用原生标题栏(无边框)
|
||||
frame: false,
|
||||
// 设置窗口最小大小
|
||||
minWidth: 950,
|
||||
minHeight: 700,
|
||||
// 设置初始窗口大小
|
||||
width: 1000,
|
||||
height: 800,
|
||||
|
||||
icon: path.join(process.env.VITE_PUBLIC, 'electron-vite.svg'),
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.mjs'),
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
win.webContents.openDevTools({ mode: 'right' }); // 可选:'undocked', 'bottom', 'right'
|
||||
}
|
||||
// Test active push message to Renderer-process.
|
||||
win.webContents.on('did-finish-load', () => {
|
||||
win?.webContents.send('main-process-message', new Date().toLocaleString())
|
||||
|
||||
Reference in New Issue
Block a user