feat: lineheight

This commit is contained in:
kwaroran
2024-06-07 17:55:59 +09:00
parent 58bf0807d2
commit 7bb056d6a8
6 changed files with 9 additions and 3 deletions

View File

@@ -652,4 +652,5 @@ export const languageEnglish = {
applyModule: "Apply Module", applyModule: "Apply Module",
successApplyModule: "Module is successfully applied", successApplyModule: "Module is successfully applied",
font: "Font", font: "Font",
lineHeight: "Line Height",
} }

View File

@@ -261,7 +261,7 @@
} }
}} }}
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem" style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem" style:line-height="{($DataBase.lineHeight ?? 1.25) * ($DataBase.zoomsize / 100)}rem"
> >
{#key $CurrentVariablePointer} {#key $CurrentVariablePointer}
{#await markParsing(msgDisplay, character, 'normal', idx, translated)} {#await markParsing(msgDisplay, character, 'normal', idx, translated)}

View File

@@ -153,6 +153,10 @@
<SliderInput min={50} max={200} bind:value={$DataBase.zoomsize} /> <SliderInput min={50} max={200} bind:value={$DataBase.zoomsize} />
<span class="text-textcolor2 mb-6 text-sm">{($DataBase.zoomsize)}%</span> <span class="text-textcolor2 mb-6 text-sm">{($DataBase.zoomsize)}%</span>
<span class="text-textcolor mt-4">{language.lineHeight}</span>
<SliderInput min={0.5} max={3} step={0.05} bind:value={$DataBase.lineHeight} />
<span class="text-textcolor2 mb-6 text-sm">{($DataBase.lineHeight)}</span>
<span class="text-textcolor">{language.iconSize}</span> <span class="text-textcolor">{language.iconSize}</span>
<SliderInput min={50} max={200} bind:value={$DataBase.iconsize} /> <SliderInput min={50} max={200} bind:value={$DataBase.iconsize} />
<span class="text-textcolor2 mb-6 text-sm">{($DataBase.iconsize)}%</span> <span class="text-textcolor2 mb-6 text-sm">{($DataBase.iconsize)}%</span>

View File

@@ -32,5 +32,5 @@
bind:value={value} bind:value={value}
class="rounded-md p-2 text-textcolor bg-transparent resize-none overflow-y-hidden border border-darkborderc" class="rounded-md p-2 text-textcolor bg-transparent resize-none overflow-y-hidden border border-darkborderc"
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem" style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem" style:line-height="{($DataBase.lineHeight ?? 1.25) * ($DataBase.zoomsize / 100)}rem"
/> />

View File

@@ -30,7 +30,6 @@ body{
--risu-theme-darkbutton: #374151; --risu-theme-darkbutton: #374151;
--risu-height-size: 100%; --risu-height-size: 100%;
--risu-font-family: Arial, sans-serif, serif; --risu-font-family: Arial, sans-serif, serif;
} }
.x-risu-language-json{ .x-risu-language-json{

View File

@@ -415,6 +415,7 @@ export function setDatabase(data:Database){
data.customTextTheme.FontColorQuote2 ??= '#FFB86C' data.customTextTheme.FontColorQuote2 ??= '#FFB86C'
data.font ??= 'default' data.font ??= 'default'
data.customFont ??= '' data.customFont ??= ''
data.lineHeight ??= 1.25
changeLanguage(data.language) changeLanguage(data.language)
DataBase.set(data) DataBase.set(data)
} }
@@ -684,6 +685,7 @@ export interface Database{
dallEQuality:string dallEQuality:string
font: string font: string
customFont: string customFont: string
lineHeight: number
} }
export interface customscript{ export interface customscript{