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 {
ChapterProvider.contentPaint
}
textPaint.color =
if (isReadAloud) context.accentColor else ReadBookConfig.textColor
val textColor = if (isReadAloud) context.accentColor else ReadBookConfig.textColor
textChars.forEach {
if (it.isImage) {
drawImage(canvas, it, lineTop, lineBottom, isImageLine)
} else {
textPaint.color = textColor
if(it.isSearchResult) {
textPaint.color = context.accentColor
}
canvas.drawText(it.charData, it.start, lineBase, textPaint)
textPaint.color = ReadBookConfig.textColor
}
if (it.selected) {
canvas.drawRect(it.start, lineTop, it.end, lineBottom, selectedPaint)

Loading…
Cancel
Save