pull/2277/head
kunfei 2 years ago
parent 64a8026bbf
commit 514f080236
  1. 1
      app/src/main/java/io/legado/app/help/config/ReadBookConfig.kt
  2. 10
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@ -210,6 +210,7 @@ object ReadBookConfig {
config.paragraphSpacing = value
}
//标题位置 0:居左 1:居中 2:隐藏
var titleMode: Int
get() = config.titleMode
set(value) {

@ -124,11 +124,10 @@ object ChapterProvider {
var durY = 0f
textPages.add(TextPage())
if (ReadBookConfig.titleMode != 2) {
//标题非隐藏
displayTitle.splitNotBlank("\n").forEach { text ->
setTypeText(
book,
absStartX,
durY,
book, absStartX, durY,
if (AppConfig.enableReview) text + reviewChar else text,
textPages,
stringBuilder,
@ -145,6 +144,7 @@ object ChapterProvider {
}
contents.forEach { content ->
if (book.getImageStyle().equals(Book.imgStyleText, true)) {
//图片样式为文字嵌入类型
var text = content.replace(srcReplaceChar, "")
val srcList = LinkedList<String>()
val sb = StringBuffer()
@ -187,9 +187,7 @@ object ChapterProvider {
val text = content.substring(start, content.length)
if (text.isNotBlank()) {
setTypeText(
book,
absStartX,
durY,
book, absStartX, durY,
if (AppConfig.enableReview) text + reviewChar else text,
textPages,
stringBuilder,

Loading…
Cancel
Save