diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2024-03-19 11:08:44 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-03-20 11:02:29 +0100 |
| commit | d2845979fe09a79d4ecf8597b2773463e2ebdc6a (patch) | |
| tree | 510e8630fe9ba50415dcde797a81a446675f2f8f /gui | |
| parent | fb83478902398545f2b2ec721d838c5cbf51b1ab (diff) | |
| download | mullvadvpn-d2845979fe09a79d4ecf8597b2773463e2ebdc6a.tar.xz mullvadvpn-d2845979fe09a79d4ecf8597b2773463e2ebdc6a.zip | |
Add IPC call to notify renderer of scale factor change
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/main/window-controller.ts | 4 | ||||
| -rw-r--r-- | gui/src/shared/ipc-schema.ts | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gui/src/main/window-controller.ts b/gui/src/main/window-controller.ts index 830f6fd1af..b18775a8b5 100644 --- a/gui/src/main/window-controller.ts +++ b/gui/src/main/window-controller.ts @@ -271,6 +271,10 @@ export default class WindowController { _display: Display, changedMetrics: string[], ) => { + if (changedMetrics.includes('scaleFactor')) { + IpcMainEventChannel.window.notifyScaleFactorChange?.(); + } + if (changedMetrics.includes('workArea') && this.window?.isVisible()) { this.onWorkAreaSizeChange(); if (process.platform === 'win32') { diff --git a/gui/src/shared/ipc-schema.ts b/gui/src/shared/ipc-schema.ts index b94fe0a701..d90957764e 100644 --- a/gui/src/shared/ipc-schema.ts +++ b/gui/src/shared/ipc-schema.ts @@ -128,6 +128,7 @@ export const ipcSchema = { shape: notifyRenderer<IWindowShapeParameters>(), focus: notifyRenderer<boolean>(), macOsScrollbarVisibility: notifyRenderer<MacOsScrollbarVisibility>(), + scaleFactorChange: notifyRenderer<void>(), }, navigation: { reset: notifyRenderer<void>(), |
