mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-28 13:58:23 +02:00
Fix:Incorrect line-height on epub titles #874
This commit is contained in:
parent
3ede41f496
commit
e53901e7a4
2 changed files with 7 additions and 6 deletions
|
@ -103,15 +103,11 @@ export default {
|
||||||
const fontColor = isDark ? '#fff' : '#000'
|
const fontColor = isDark ? '#fff' : '#000'
|
||||||
const backgroundColor = isDark ? 'rgb(35 35 35)' : 'rgb(255, 255, 255)'
|
const backgroundColor = isDark ? 'rgb(35 35 35)' : 'rgb(255, 255, 255)'
|
||||||
|
|
||||||
const lineSpacing = this.ereaderSettings.lineSpacing / 100
|
|
||||||
|
|
||||||
const fontScale = this.ereaderSettings.fontScale / 100
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'*': {
|
'*': {
|
||||||
color: `${fontColor}!important`,
|
color: `${fontColor}!important`,
|
||||||
'background-color': `${backgroundColor}!important`,
|
'background-color': `${backgroundColor}!important`,
|
||||||
'line-height': lineSpacing * fontScale + 'rem!important'
|
'line-height': this.ereaderSettings.lineSpacing + '%!important'
|
||||||
},
|
},
|
||||||
a: {
|
a: {
|
||||||
color: `${fontColor}!important`
|
color: `${fontColor}!important`
|
||||||
|
|
|
@ -289,7 +289,8 @@ export default {
|
||||||
const touchDistanceX = Math.abs(this.touchendX - this.touchstartX)
|
const touchDistanceX = Math.abs(this.touchendX - this.touchstartX)
|
||||||
const touchDistanceY = Math.abs(this.touchendY - this.touchstartY)
|
const touchDistanceY = Math.abs(this.touchendY - this.touchstartY)
|
||||||
const touchDistance = Math.sqrt(Math.pow(this.touchstartX - this.touchendX, 2) + Math.pow(this.touchstartY - this.touchendY, 2))
|
const touchDistance = Math.sqrt(Math.pow(this.touchstartX - this.touchendX, 2) + Math.pow(this.touchstartY - this.touchendY, 2))
|
||||||
if (touchDistance < 60) {
|
console.log('[Reader] Touch distance=', touchDistance)
|
||||||
|
if (touchDistance < 30) {
|
||||||
if (this.showSettingsModal) {
|
if (this.showSettingsModal) {
|
||||||
this.showSettingsModal = false
|
this.showSettingsModal = false
|
||||||
} else {
|
} else {
|
||||||
|
@ -303,9 +304,11 @@ export default {
|
||||||
}
|
}
|
||||||
this.hideToolbar()
|
this.hideToolbar()
|
||||||
if (this.touchendX < this.touchstartX) {
|
if (this.touchendX < this.touchstartX) {
|
||||||
|
console.log('[Reader] Gesture next page')
|
||||||
this.next()
|
this.next()
|
||||||
}
|
}
|
||||||
if (this.touchendX > this.touchstartX) {
|
if (this.touchendX > this.touchstartX) {
|
||||||
|
console.log('[Reader] Gesture prev page')
|
||||||
this.prev()
|
this.prev()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -322,6 +325,7 @@ export default {
|
||||||
else this.showToolbar()
|
else this.showToolbar()
|
||||||
},
|
},
|
||||||
touchstart(e) {
|
touchstart(e) {
|
||||||
|
console.log('[Reader] Touch start')
|
||||||
// Ignore rapid touch
|
// Ignore rapid touch
|
||||||
if (this.touchstartTime && Date.now() - this.touchstartTime < 250) {
|
if (this.touchstartTime && Date.now() - this.touchstartTime < 250) {
|
||||||
return
|
return
|
||||||
|
@ -333,6 +337,7 @@ export default {
|
||||||
this.touchIdentifier = e.touches[0].identifier
|
this.touchIdentifier = e.touches[0].identifier
|
||||||
},
|
},
|
||||||
touchend(e) {
|
touchend(e) {
|
||||||
|
console.log('[Reader] Touch end')
|
||||||
if (this.touchIdentifier !== e.changedTouches[0].identifier) {
|
if (this.touchIdentifier !== e.changedTouches[0].identifier) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue