소스 검색

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

HapeLee 9 달 전
부모
커밋
62e87b0a60
1개의 변경된 파일과 6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      app/src/main/java/io/legado/app/ui/book/read/page/entities/column/TextColumn.kt

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