Horis 2 лет назад
Родитель
Сommit
53421c7b63

+ 1 - 1
app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt

@@ -326,7 +326,7 @@ data class TextPage(
 
 
     fun render(view: ContentTextView): Boolean {
     fun render(view: ContentTextView): Boolean {
         if (!isCompleted) return false
         if (!isCompleted) return false
-        return canvasRecorder.recordIfNeeded(view.width, view.height) {
+        return canvasRecorder.recordIfNeeded(view.width, height.toInt() + paddingTop) {
             drawPage(view, this)
             drawPage(view, this)
         }
         }
     }
     }

+ 1 - 3
app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt

@@ -446,9 +446,7 @@ class TextChapterLayout(
             val textLine = TextLine(isTitle = isTitle)
             val textLine = TextLine(isTitle = isTitle)
             if (durY + textHeight > visibleHeight) {
             if (durY + textHeight > visibleHeight) {
                 val textPage = pendingTextPage
                 val textPage = pendingTextPage
-                if (textPage.height < durY) {
-                    textPage.height = durY
-                }
+                textPage.height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
                 if (doublePage && absStartX < viewWidth / 2) {
                 if (doublePage && absStartX < viewWidth / 2) {
                     //当前页面左列结束
                     //当前页面左列结束
                     textPage.leftLineSize = textPage.lineSize
                     textPage.leftLineSize = textPage.lineSize