From d3e4352b5c0966351ea203821496fd9226a168bb Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Mar 2020 13:32:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/read/page/ChapterProvider.kt | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt index 6d16bf50f..706c3d603 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt @@ -61,13 +61,7 @@ object ChapterProvider { val title = surplusText.substring(0, end) surplusText = surplusText.substring(end + 1) durY = setTypeText( - title, - durY, - textPages, - pageLines, - pageLengths, - stringBuilder, - true + title, durY, textPages, pageLines, pageLengths, stringBuilder, true ) } } else { @@ -145,9 +139,9 @@ object ChapterProvider { textPages.add(TextPage()) textPages.last().textLines.add(textLine) } - textLine.lineTop = paddingTop + durY - textPaint.textHeight - textLine.lineBase = paddingTop + durY - textPaint.fontMetrics.descent - textLine.lineBottom = paddingTop + durY + textLine.lineBottom = paddingTop + durY - lineSpacingExtra + textLine.lineBase = textLine.lineBottom - textPaint.fontMetrics.descent + textLine.lineTop = textLine.lineBottom - textPaint.textHeight val words = text.substring(layout.getLineStart(lineIndex), layout.getLineEnd(lineIndex)) stringBuilder.append(words)