From d2030ee89c2f6e0b4bbfb0b250fd7c5e6724e581 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Tue, 27 Feb 2024 16:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/read/page/provider/TextChapterLayout.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt index 24e5d9cdf..d1e4dc5a3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt @@ -463,10 +463,10 @@ class TextChapterLayout( val lineText = text.substring(lineStart, lineEnd) val (words, widths) = measureTextSplit(lineText, textPaint) val desiredWidth = widths.fastSum() + textLine.text = lineText when { lineIndex == 0 && layout.lineCount > 1 && !isTitle -> { //第一行 非标题 - textLine.text = lineText addCharsToLineFirst( book, absStartX, textLine, words, textPaint, desiredWidth, widths, srcList @@ -475,7 +475,6 @@ class TextChapterLayout( lineIndex == layout.lineCount - 1 -> { //最后一行 - textLine.text = lineText //标题x轴居中 val startX = if ( isTitle && @@ -504,7 +503,6 @@ class TextChapterLayout( ) } else { //中间行 - textLine.text = lineText addCharsToLineMiddle( book, absStartX, textLine, words, textPaint, desiredWidth, 0f, widths, srcList