fix the scalings

This commit is contained in:
vapormusic 2021-12-27 08:26:10 +07:00
parent cc876f7247
commit 6525110c61
2 changed files with 3 additions and 5 deletions

View file

@ -38,7 +38,7 @@ const CiderBase = {
frame: false, frame: false,
title: "Cider", title: "Cider",
vibrancy: 'dark', vibrancy: 'dark',
transparent: true, // transparent: true,
hasShadow: false, hasShadow: false,
webPreferences: { webPreferences: {
webviewTag: true, webviewTag: true,
@ -194,10 +194,6 @@ const CiderBase = {
ipcMain.on('setScreenScale', (event, scale) => { ipcMain.on('setScreenScale', (event, scale) => {
win.webContents.setZoomFactor(parseFloat(scale)) win.webContents.setZoomFactor(parseFloat(scale))
}) })
var mainScreen = screen.getPrimaryDisplay();
var dimensions = mainScreen.size;
var screenWidth = dimensions.width;
win.webContents.setZoomFactor(screenWidth / 1536)
return win return win
}, },

View file

@ -2572,3 +2572,5 @@ async function webGPU() {
webGPU().then() webGPU().then()
let screenWidth = screen.width;
ipcRenderer.send("setScreenScale" ,screenWidth / 1536)