mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-07 08:06:49 +08:00
Add: Option to toggle DPI scaling
This commit is contained in:
parent
b46d7dea19
commit
186c78eae9
@ -99,6 +99,10 @@ Deploy:
|
|||||||
# 'default' for light theme
|
# 'default' for light theme
|
||||||
# 'dark' for dark theme
|
# 'dark' for dark theme
|
||||||
Theme: default
|
Theme: default
|
||||||
|
# Follow system DPI scaling
|
||||||
|
# [In most cases] true
|
||||||
|
# [In few cases] false to make Alas smaller, if you have a low resolution but high DPI scaling.
|
||||||
|
DpiScaling: true
|
||||||
# --key. Password of web ui
|
# --key. Password of web ui
|
||||||
# Useful when expose Alas to the public network
|
# Useful when expose Alas to the public network
|
||||||
Password: null
|
Password: null
|
||||||
|
@ -20,4 +20,4 @@ aiofiles
|
|||||||
wrapt==1.13.1
|
wrapt==1.13.1
|
||||||
prettytable==2.2.1
|
prettytable==2.2.1
|
||||||
pypresence==4.2.1
|
pypresence==4.2.1
|
||||||
alas-webapp==0.3.6
|
alas-webapp==0.3.7
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
adbutils==0.11.0 # via uiautomator2
|
adbutils==0.11.0 # via uiautomator2
|
||||||
aiofiles==0.7.0 # via -r requirements-in.txt
|
aiofiles==0.7.0 # via -r requirements-in.txt
|
||||||
alas-webapp==0.3.6 # via -r requirements-in.txt
|
alas-webapp==0.3.7 # via -r requirements-in.txt
|
||||||
anyio==1.3.1 # via -r requirements-in.txt
|
anyio==1.3.1 # via -r requirements-in.txt
|
||||||
apkutils2==1.0.0 # via adbutils
|
apkutils2==1.0.0 # via adbutils
|
||||||
asgiref==3.4.1 # via uvicorn
|
asgiref==3.4.1 # via uvicorn
|
||||||
|
@ -14,3 +14,4 @@ export const pythonPath = (path.isAbsolute(PythonExecutable) ? PythonExecutable
|
|||||||
export const webuiUrl = `http://127.0.0.1:${WebuiPort}`;
|
export const webuiUrl = `http://127.0.0.1:${WebuiPort}`;
|
||||||
export const webuiPath = 'gui.py';
|
export const webuiPath = 'gui.py';
|
||||||
export const webuiArgs = ['--port', WebuiPort, '--electron'];
|
export const webuiArgs = ['--port', WebuiPort, '--electron'];
|
||||||
|
export const dpiScaling = Boolean(config.Deploy.Webui.DpiScaling) || (config.Deploy.Webui.DpiScaling === undefined) ;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {app, Menu, Tray, BrowserWindow, ipcMain, globalShortcut} from 'electron';
|
import {app, Menu, Tray, BrowserWindow, ipcMain, globalShortcut} from 'electron';
|
||||||
import {URL} from 'url';
|
import {URL} from 'url';
|
||||||
import {PyShell} from '/@/pyshell';
|
import {PyShell} from '/@/pyshell';
|
||||||
import {webuiArgs, webuiPath} from '/@/config';
|
import {webuiArgs, webuiPath, dpiScaling} from '/@/config';
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
@ -143,8 +143,11 @@ const createWindow = async () => {
|
|||||||
|
|
||||||
|
|
||||||
// No DPI scaling
|
// No DPI scaling
|
||||||
// app.commandLine.appendSwitch('high-dpi-support', '1');
|
if (!dpiScaling) {
|
||||||
// app.commandLine.appendSwitch('force-device-scale-factor', '1');
|
app.commandLine.appendSwitch('high-dpi-support', '1');
|
||||||
|
app.commandLine.appendSwitch('force-device-scale-factor', '1');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function loadURL() {
|
function loadURL() {
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user