fix: use workArea instead of bounds for initial window size
Respects taskbar on Linux (KDE etc.) and menu bar on macOS.
bounds caused the window to extend behind the taskbar on KDE.
workArea gives {x, y, width, height} of the usable screen region.
This commit is contained in:
@@ -18,13 +18,13 @@ async function createWindow() {
|
|||||||
cachedFullConfig = await fetchFullConfig(cachedSeed);
|
cachedFullConfig = await fetchFullConfig(cachedSeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { bounds } = screen.getPrimaryDisplay();
|
const { workArea } = screen.getPrimaryDisplay();
|
||||||
|
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
width: bounds.width,
|
width: workArea.width,
|
||||||
height: bounds.height,
|
height: workArea.height,
|
||||||
x: bounds.x,
|
x: workArea.x,
|
||||||
y: bounds.y,
|
y: workArea.y,
|
||||||
title: 'OSIT Aether Launcher (Native)',
|
title: 'OSIT Aether Launcher (Native)',
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, '../preload/index.js'),
|
preload: path.join(__dirname, '../preload/index.js'),
|
||||||
|
|||||||
Reference in New Issue
Block a user