Set minimum windows boundaries

This commit is contained in:
2025-08-24 21:01:25 +03:00
Unverified
parent a1be1daa09
commit 3bbfafa9e5
+12 -10
View File
@@ -1,15 +1,17 @@
import { app, BrowserWindow } from 'electron';
app.whenReady().then(() => {
const win = new BrowserWindow({
title: 'Main window',
})
const win = new BrowserWindow({
title: 'Main window',
minWidth: 650,
minHeight: 420
})
// You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve`
if (process.env.VITE_DEV_SERVER_URL) {
win.loadURL(process.env.VITE_DEV_SERVER_URL)
} else {
// Load your file
win.loadFile('dist/index.html');
}
// You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve`
if (process.env.VITE_DEV_SERVER_URL) {
win.loadURL(process.env.VITE_DEV_SERVER_URL)
} else {
// Load your file
win.loadFile('dist/index.html');
}
});