From f1db13b1fd4d5ba6c1a848f234763ca8a8573f38 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Feb 2018 11:14:17 -0500 Subject: [PATCH] maximize window if too big --- src/main/window.main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/window.main.ts b/src/main/window.main.ts index 68e778d30d..a406431ca9 100644 --- a/src/main/window.main.ts +++ b/src/main/window.main.ts @@ -184,11 +184,15 @@ export class WindowMain { } if (displayBounds != null) { + if (state.width > displayBounds.width && state.height > displayBounds.height) { + state.isMaximized = true; + } + if (state.width > displayBounds.width) { - state.width = displayBounds.width; + state.width = displayBounds.width - 10; } if (state.height > displayBounds.height) { - state.height = displayBounds.height; + state.height = displayBounds.height - 10; } }