From 9432ea29fd842d76afde0feec34fe1d86d8a45cd Mon Sep 17 00:00:00 2001 From: HapeLee <63206378+HapeLee@users.noreply.github.com> Date: Sun, 14 Jun 2026 00:18:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E5=88=92=E8=99=9A=E7=BA=BF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/page/entities/TextLine.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt index 70d9df857..3faf550f6 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt @@ -232,9 +232,12 @@ data class TextLine( * 绘制下划线 */ private fun drawUnderline(canvas: Canvas, dottedLine: Boolean) { - val paint = ChapterProvider.contentPaint + val paint = PaintPool.obtain() + paint.set(ChapterProvider.contentPaint) + paint.clearShadowLayer() paint.color = ReadBookConfig.durConfig.curUnderlineColor() paint.strokeWidth = ReadBookConfig.underlineHeight.toFloat() + paint.style = Paint.Style.STROKE paint.pathEffect = if (dottedLine && !ReadConfig.isEInkMode) ChapterProvider.dashEffect else @@ -252,6 +255,7 @@ data class TextLine( lineEnd } canvas.drawLine(startX, lineY, endX, lineY, paint) + PaintPool.recycle(paint) } /** @@ -412,6 +416,7 @@ data class TextLine( ) { val paint = PaintPool.obtain() paint.set(ChapterProvider.contentPaint) + paint.clearShadowLayer() paint.color = underlineColor paint.strokeWidth = underlineWidth.dpToPx() paint.style = Paint.Style.STROKE