summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/window-controller.ts2
-rw-r--r--gui/src/renderer/app.tsx12
2 files changed, 10 insertions, 4 deletions
diff --git a/gui/src/main/window-controller.ts b/gui/src/main/window-controller.ts
index 1904383475..c42d0398e3 100644
--- a/gui/src/main/window-controller.ts
+++ b/gui/src/main/window-controller.ts
@@ -263,7 +263,7 @@ export default class WindowController {
}
}
- // On linux, the window won't be properly rescaled back to it's original
+ // On Linux and Windows, the window won't be properly rescaled back to it's original
// size if the DPI scaling factor is changed.
// https://github.com/electron/electron/issues/11050
if (process.platform === 'linux' && changedMetrics.includes('scaleFactor')) {
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 7880352d7b..0acbd25ab2 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -224,7 +224,10 @@ export default class AppRenderer {
void this.onDaemonConnected();
}
- this.checkContentHeight();
+ this.checkContentHeight(false);
+ window.addEventListener('resize', () => {
+ this.checkContentHeight(true);
+ });
if (initialState.windowsSplitTunnelingApplications) {
this.reduxActions.settings.setSplitTunnelingApplications(
@@ -577,7 +580,7 @@ export default class AppRenderer {
// purposes since there's a bug in Electron that causes the app height to be another value than
// the one we have set.
// https://github.com/electron/electron/issues/28777
- private checkContentHeight(): void {
+ private checkContentHeight(resize: boolean): void {
let expectedContentHeight = 568;
// The app content is 12px taller on macOS to fit the top arrow.
@@ -587,7 +590,10 @@ export default class AppRenderer {
const contentHeight = window.innerHeight;
if (contentHeight !== expectedContentHeight) {
- log.error(`Wrong content height ${contentHeight}, expected ${expectedContentHeight}`);
+ log.debug(
+ resize ? 'Resize:' : 'Initial:',
+ `Wrong content height: ${contentHeight}, expected ${expectedContentHeight}`,
+ );
}
}