pull/1470/head
gedoor 3 years ago
parent 7965f975e6
commit 8901926050
  1. 5
      app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt

@ -139,17 +139,16 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
} else { } else {
ChapterProvider.contentPaint ChapterProvider.contentPaint
} }
textPaint.color = val textColor = if (isReadAloud) context.accentColor else ReadBookConfig.textColor
if (isReadAloud) context.accentColor else ReadBookConfig.textColor
textChars.forEach { textChars.forEach {
if (it.isImage) { if (it.isImage) {
drawImage(canvas, it, lineTop, lineBottom, isImageLine) drawImage(canvas, it, lineTop, lineBottom, isImageLine)
} else { } else {
textPaint.color = textColor
if(it.isSearchResult) { if(it.isSearchResult) {
textPaint.color = context.accentColor textPaint.color = context.accentColor
} }
canvas.drawText(it.charData, it.start, lineBase, textPaint) canvas.drawText(it.charData, it.start, lineBase, textPaint)
textPaint.color = ReadBookConfig.textColor
} }
if (it.selected) { if (it.selected) {
canvas.drawRect(it.start, lineTop, it.end, lineBottom, selectedPaint) canvas.drawRect(it.start, lineTop, it.end, lineBottom, selectedPaint)

Loading…
Cancel
Save