1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +01:00

maximize window if too big

This commit is contained in:
Kyle Spearrin 2018-02-16 11:14:17 -05:00
parent c9645ef262
commit f1db13b1fd

View File

@ -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;
}
}