CSS optimizations for HW acceleration disabled

This commit is contained in:
booploops 2021-12-27 00:02:29 -08:00
parent 997847e146
commit f9739f7d24
4 changed files with 32 additions and 0 deletions

View file

@ -83,6 +83,7 @@ app.on('ready', () => {
if (app.isQuiting) { app.quit(); return; } if (app.isQuiting) { app.quit(); return; }
app.commandLine.appendSwitch('high-dpi-support', 1) app.commandLine.appendSwitch('high-dpi-support', 1)
app.commandLine.appendSwitch('force-device-scale-factor', 1) app.commandLine.appendSwitch('force-device-scale-factor', 1)
app.commandLine.appendSwitch('disable-pinch');
console.log('[Cider] Application is Ready. Creating Window.') console.log('[Cider] Application is Ready. Creating Window.')
if (!app.isPackaged) { if (!app.isPackaged) {

View file

@ -108,6 +108,10 @@ const CiderBase = {
event.returnValue = process.platform event.returnValue = process.platform
}) })
ipcMain.on("get-gpu-mode", (event) => {
event.returnValue = process.platform
})
ipcMain.on("is-dev", (event) => { ipcMain.on("is-dev", (event) => {
event.returnValue = !app.isPackaged event.returnValue = !app.isPackaged
}) })

View file

@ -340,6 +340,9 @@ const app = new Vue({
if(this.isDev) { if(this.isDev) {
this.mk.privateEnabled = true this.mk.privateEnabled = true
} }
if(this.cfg.visual.hw_acceleration == "disabled") {
document.body.classList.add("no-gpu")
}
this.mk._services.timing.mode = 0 this.mk._services.timing.mode = 0
this.platform = ipcRenderer.sendSync('cider-platform'); this.platform = ipcRenderer.sendSync('cider-platform');
// Set profile name // Set profile name

View file

@ -3174,4 +3174,28 @@ input[type=checkbox][switch]:checked:active::before {
.albums-square-container { .albums-square-container {
text-align: center; text-align: center;
}
body.no-gpu {
#navigation-bar {
backdrop-filter: unset;
mix-blend-mode: unset;
background: rgb(0 0 0);
}
.app-drawer {
backdrop-filter: unset;
mix-blend-mode: unset;
background: #1c1c1c;
}
.wpfade-enter-active,
.wpfade-leave-active {
transition: opacity 0s var(--appleEase);
}
.wpfade-enter,
.wpfade-leave-to {
opacity: 0;
}
} }