fix: dynamic height calc for windows for better accessibility

This commit is contained in:
haritabh-z01 2025-12-16 12:31:32 +05:30
parent 8b779b79e5
commit 71c35f243a

View file

@ -103,9 +103,12 @@ export class WindowManager {
// Get theme colors before creating window
const colors = await this.getThemeColors();
const primaryDisplay = screen.getPrimaryDisplay();
const windowHeight = Math.min(800, primaryDisplay.workAreaSize.height - 40);
this.mainWindow = new BrowserWindow({
width: 1200,
height: 800,
height: windowHeight,
frame: true,
titleBarStyle: "hidden",
titleBarOverlay: {
@ -239,9 +242,12 @@ export class WindowManager {
// Get theme colors before creating window
const colors = await this.getThemeColors();
const primaryDisplay = screen.getPrimaryDisplay();
const windowHeight = Math.min(928, primaryDisplay.workAreaSize.height - 40);
this.onboardingWindow = new BrowserWindow({
width: 800,
height: 928,
height: windowHeight,
frame: true,
titleBarStyle: "hidden",
titleBarOverlay: {