[bugfix] Config Page: Appearance tab. Fix Ui Font setting that was not working.

This commit is contained in:
Sakamoto Shiina
2024-11-21 15:17:36 +09:00
parent c05b5d18fa
commit 7e16b2f101
3 changed files with 4 additions and 4 deletions

View File

@@ -143,7 +143,6 @@ const UiSizeController = () => {
useEffect(() => { useEffect(() => {
document.documentElement.style.setProperty("font-size", `${font_size}%`); document.documentElement.style.setProperty("font-size", `${font_size}%`);
document.documentElement.style.setProperty("font-family", `Yu Gothic UI`);
}, [currentUiScaling.data]); }, [currentUiScaling.data]);
return null; return null;
@@ -153,7 +152,7 @@ const UiSizeController = () => {
const FontFamilyController = () => { const FontFamilyController = () => {
const { currentSelectedFontFamily } = useSelectedFontFamily(); const { currentSelectedFontFamily } = useSelectedFontFamily();
useEffect(() => { useEffect(() => {
document.documentElement.style.setProperty("font-family", `${currentSelectedFontFamily.data}`); document.documentElement.style.setProperty("--font_family", currentSelectedFontFamily.data);
}, [currentSelectedFontFamily.data]); }, [currentSelectedFontFamily.data]);
return null; return null;

View File

@@ -4,7 +4,6 @@
:root { :root {
font-size: 62.5%; font-size: 62.5%;
color: #F2F2F2; color: #F2F2F2;
font-family: "Yu Gothic UI";
} }
* { * {
@@ -24,7 +23,7 @@
html, body { html, body {
height: 100%; height: 100%;
font-family: "Yu Gothic UI"; /* If not found the font family where 'root:' that is selected by user*/ font-family: var(--font_family); /* If not found the font family where 'root:' that is selected by user*/
border-radius: 1.8rem; border-radius: 1.8rem;
} }

View File

@@ -50,4 +50,6 @@
--main_page_topbar_height: 4.8rem; --main_page_topbar_height: 4.8rem;
--config_page_sidebar_width: 18rem; --config_page_sidebar_width: 18rem;
--config_page_topbar_height: 8rem; --config_page_topbar_height: 8rem;
--font_family: "Yu Gothic UI";
} }