added fontScale

This commit is contained in:
SrGooglo 2023-11-28 17:28:37 +00:00
parent e925cb5b85
commit 4d8fdd9549
3 changed files with 56 additions and 2 deletions

View File

@ -1,5 +1,6 @@
{
"defaultVars": {
"fontScale": "1",
"backgroundBlur": "10px",
"colorPrimary": "#ff6064",
"app-color": "#ff6064",

View File

@ -103,6 +103,32 @@ export default {
},
storaged: true
},
{
id: "style.uiFontScale",
group: "aspect",
component: "Slider",
title: "UI font scale",
description: "Change the font scale of the application.",
props: {
min: 1,
max: 1.2,
step: 0.01,
tooltip: {
formatter: (value) => `${value}x`
}
},
defaultValue: () => {
return app.cores.style.getValue("fontScale")
},
onUpdate: (value) => {
app.cores.style.modify({
"fontScale": value
})
return value
},
storaged: true
},
{
id: "style.uiFont",
group: "aspect",

View File

@ -9,7 +9,35 @@
*:before,
*:after {
box-sizing: inherit;
//font-size: calc(1rem * var(--fontScale));
font-size: calc(1em * var(--fontScale));
}
h1 {
font-size: calc(1.4em * var(--fontScale));
}
h2 {
font-size: calc(1.2em * var(--fontScale));
}
h3 {
font-size: calc(1em * var(--fontScale));
}
h4 {
font-size: calc(1em * var(--fontScale));
}
h5 {
font-size: calc(1em* var(--fontScale));
}
h6 {
font-size: calc(1em * var(--fontScale));
}
p {
font-size: calc(1em * var(--fontScale));
}
#nprogress {
@ -162,7 +190,6 @@ svg {
/* disable the IOS popup when long-press on a link */
}
// LAYOUT
.app_layout {
position: relative;