mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-28 04:56:44 -06:00
fix hw acc
This commit is contained in:
parent
97a79ae67b
commit
7417bfadc8
2 changed files with 12 additions and 11 deletions
|
@ -198,17 +198,8 @@ export async function common(createVue: () => App<Element>) {
|
||||||
}, { immediate: true });
|
}, { immediate: true });
|
||||||
|
|
||||||
watch(defaultStore.reactiveState.useHardwareAcceleration, v => {
|
watch(defaultStore.reactiveState.useHardwareAcceleration, v => {
|
||||||
if (v) {
|
document.documentElement.classList.toggle('font-smoothing-auto', !v);
|
||||||
const miHwAcc = document.createElement('style');
|
}, { immediate: true });
|
||||||
miHwAcc.textContent = `html {
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
}`;
|
|
||||||
document.head.appendChild(miHwAcc);
|
|
||||||
} else {
|
|
||||||
document.querySelector('style')?.remove();
|
|
||||||
}
|
|
||||||
}, { immediate: true });
|
|
||||||
|
|
||||||
// Keep screen on
|
// Keep screen on
|
||||||
const onVisibilityChange = () => document.addEventListener('visibilitychange', () => {
|
const onVisibilityChange = () => document.addEventListener('visibilitychange', () => {
|
||||||
|
|
|
@ -14,6 +14,16 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* 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 {
|
:root {
|
||||||
--MI-radius: 12px;
|
--MI-radius: 12px;
|
||||||
--MI-marginFull: 16px;
|
--MI-marginFull: 16px;
|
||||||
|
|
Loading…
Reference in a new issue