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 8d5cdc422..80db62d70 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 @@ -194,7 +194,9 @@ object ChapterProvider { //ζœ€εŽδΈ€θ‘Œ textLine.text = "$words\n" stringBuilder.append("\n") - var x = 0f + var x = if (ReadBookConfig.durConfig.titleCenter) + (visibleWidth - layout.getLineMax(lineIndex)) / 2 + else 0f for (i in words.indices) { val char = words[i].toString() val cw = StaticLayout.getDesiredWidth(char, titlePaint)