maximize window if too big

This commit is contained in:
Kyle Spearrin 2018-02-16 11:14:17 -05:00
parent c9645ef262
commit f1db13b1fd
1 changed files with 6 additions and 2 deletions

View File

@ -184,11 +184,15 @@ export class WindowMain {
} }
if (displayBounds != null) { if (displayBounds != null) {
if (state.width > displayBounds.width && state.height > displayBounds.height) {
state.isMaximized = true;
}
if (state.width > displayBounds.width) { if (state.width > displayBounds.width) {
state.width = displayBounds.width; state.width = displayBounds.width - 10;
} }
if (state.height > displayBounds.height) { if (state.height > displayBounds.height) {
state.height = displayBounds.height; state.height = displayBounds.height - 10;
} }
} }