Просмотр исходного кода

[修复] 修复次行缩放功能

HapeLee 9 месяцев назад
Родитель
Сommit
62e87b0a60

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

@@ -47,11 +47,15 @@ data class TextColumn(
         } else {
             ChapterProvider.contentPaint
         }
-        val textColor = if (textLine.isReadAloud || isSearchResult) {
+        val textColor = if (!textLine.useUnderline && (textLine.isReadAloud || isSearchResult)) {
             ReadBookConfig.textAccentColor
         } else {
             ReadBookConfig.textColor
         }
+        val originalSize = textPaint.textSize
+        textLine.titleTextSize?.let {
+            textPaint.textSize = it
+        }
         if (textPaint.color != textColor) {
             textPaint.color = textColor
         }
@@ -66,6 +70,7 @@ data class TextColumn(
         if (selected) {
             canvas.drawRect(start, 0f, end, textLine.height, view.selectedPaint)
         }
+        textPaint.textSize = originalSize
     }
 
 }