Merge pull request #3040 from BimBimSalaBim/master

E-Reader Font Boldness Slider #3020
This commit is contained in:
advplyr 2024-06-07 17:05:29 -05:00 committed by GitHub
commit 5da4861716
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 72 additions and 29 deletions

View file

@ -46,7 +46,8 @@ export default {
font: 'serif',
fontScale: 100,
lineSpacing: 115,
spread: 'auto'
spread: 'auto',
textStroke: 0
}
}
},
@ -109,11 +110,14 @@ export default {
const fontScale = this.ereaderSettings.fontScale / 100
const textStroke = this.ereaderSettings.textStroke / 100
return {
'*': {
color: `${fontColor}!important`,
'background-color': `${backgroundColor}!important`,
'line-height': lineSpacing * fontScale + 'rem!important'
'line-height': lineSpacing * fontScale + 'rem!important',
'-webkit-text-stroke': textStroke + 'px ' + fontColor + '!important'
},
a: {
color: `${fontColor}!important`

View file

@ -98,6 +98,12 @@
</div>
<ui-range-input v-model="ereaderSettings.lineSpacing" :min="100" :max="300" :step="5" @input="settingsUpdated" />
</div>
<div class="flex items-center mb-4">
<div class="w-40">
<p class="text-lg">{{ $strings.LabelFontBoldness }}:</p>
</div>
<ui-range-input v-model="ereaderSettings.textStroke" :min="0" :max="300" :step="5" @input="settingsUpdated" />
</div>
<div class="flex items-center">
<div class="w-40">
<p class="text-lg">{{ $strings.LabelLayout }}:</p>
@ -130,7 +136,9 @@ export default {
font: 'serif',
fontScale: 100,
lineSpacing: 115,
spread: 'auto'
fontBoldness: 100,
spread: 'auto',
textStroke: 0
}
}
},
@ -378,7 +386,12 @@ export default {
try {
const settings = localStorage.getItem('ereaderSettings')
if (settings) {
this.ereaderSettings = JSON.parse(settings)
const _ereaderSettings = JSON.parse(settings)
for (const key in this.ereaderSettings) {
if (_ereaderSettings[key] !== undefined) {
this.ereaderSettings[key] = _ereaderSettings[key]
}
}
this.settingsUpdated()
}
} catch (error) {
@ -416,4 +429,4 @@ export default {
height: 100%;
}
}
</style>
</style>