From 7a6827ec8b0741a604dc42453246f4dd495cb74a Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Mon, 11 Sep 2023 18:52:48 +0800 Subject: [PATCH] Fix: Additional parameters dpiScaling --- webapp/packages/main/src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp/packages/main/src/index.ts b/webapp/packages/main/src/index.ts index 4d073c5ab..0da2b0b2f 100644 --- a/webapp/packages/main/src/index.ts +++ b/webapp/packages/main/src/index.ts @@ -2,7 +2,7 @@ import {app, BrowserWindow} from 'electron'; import './security-restrictions'; import {createApp} from '/@/createApp'; import logger from '/@/logger'; -import {noSandbox} from '/@/config'; +import {dpiScaling} from '/@/config'; /** * Prevent electron from running multiple instances. @@ -43,6 +43,12 @@ app.commandLine.appendSwitch('disable-gpu-sandbox'); app.commandLine.appendSwitch('in-process-gpu'); app.commandLine.appendSwitch('no-sandbox'); +// No DPI scaling +if (!dpiScaling) { + app.commandLine.appendSwitch('high-dpi-support', '1'); + app.commandLine.appendSwitch('force-device-scale-factor', '1'); +} + /** *Set App Error Log Path */