summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/src/renderer/app.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 6f656c5dfe..7627428059 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -240,6 +240,8 @@ export default class AppRenderer {
if (initialState.isConnected) {
consumePromise(this.onDaemonConnected());
}
+
+ this.checkContentHeight();
}
public renderView() {
@@ -520,6 +522,24 @@ export default class AppRenderer {
return preferredLocale ? preferredLocale.name : '';
}
+ // Make sure that the content height is correct and log if it isn't. This is mostly for debugging
+ // 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 {
+ let expectedContentHeight = 568;
+
+ // The app content is 12px taller on macOS to fit the top arrow.
+ if (window.platform === 'darwin' && !this.guiSettings.unpinnedWindow) {
+ expectedContentHeight += 12;
+ }
+
+ const contentHeight = window.innerHeight;
+ if (contentHeight !== expectedContentHeight) {
+ log.error(`Wrong content height ${contentHeight}, expected ${expectedContentHeight}`);
+ }
+ }
+
private redirectToConnect() {
// Redirect the user after some time to allow for the 'Logged in' screen to be visible
this.loginScheduler.schedule(() => this.resetNavigation(), 1000);