mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 08:13:40 +08:00
feat(electron): set window minimum size (closes #994)
This commit is contained in:
parent
d8a1852935
commit
3e5bd01fc1
@ -156,6 +156,8 @@ async function createMainWindow(app: App) {
|
|||||||
y: mainWindowState.y,
|
y: mainWindowState.y,
|
||||||
width: mainWindowState.width,
|
width: mainWindowState.width,
|
||||||
height: mainWindowState.height,
|
height: mainWindowState.height,
|
||||||
|
minWidth: 500,
|
||||||
|
minHeight: 400,
|
||||||
title: "TriliumNext Notes",
|
title: "TriliumNext Notes",
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
@ -185,7 +187,7 @@ async function createMainWindow(app: App) {
|
|||||||
if (lastFocusedWindow.isMinimized()) {
|
if (lastFocusedWindow.isMinimized()) {
|
||||||
lastFocusedWindow.restore();
|
lastFocusedWindow.restore();
|
||||||
}
|
}
|
||||||
lastFocusedWindow.show();
|
lastFocusedWindow.show();
|
||||||
lastFocusedWindow.focus();
|
lastFocusedWindow.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user