fix hw acc

This commit is contained in:
fly_mc 2024-11-01 08:48:13 +08:00
parent 97a79ae67b
commit 7417bfadc8
2 changed files with 12 additions and 11 deletions

View file

@ -198,16 +198,7 @@ export async function common(createVue: () => App<Element>) {
}, { immediate: true });
watch(defaultStore.reactiveState.useHardwareAcceleration, v => {
if (v) {
const miHwAcc = document.createElement('style');
miHwAcc.textContent = `html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}`;
document.head.appendChild(miHwAcc);
} else {
document.querySelector('style')?.remove();
}
document.documentElement.classList.toggle('font-smoothing-auto', !v);
}, { immediate: true });
// Keep screen on

View file

@ -14,6 +14,16 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.font-smoothing-auto * {
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
}
:root {
--MI-radius: 12px;
--MI-marginFull: 16px;