|
|
|
@ -23,6 +23,7 @@ import io.legado.app.ui.widget.dialog.PhotoDialog |
|
|
|
|
import io.legado.app.utils.activity |
|
|
|
|
import io.legado.app.utils.getCompatColor |
|
|
|
|
import io.legado.app.utils.getPrefBoolean |
|
|
|
|
import io.legado.app.utils.toastOnUi |
|
|
|
|
import kotlinx.coroutines.CoroutineScope |
|
|
|
|
import kotlin.math.min |
|
|
|
|
|
|
|
|
@ -178,7 +179,11 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at |
|
|
|
|
val div = (lineBottom - lineTop - h) / 2 |
|
|
|
|
RectF(textChar.start, lineTop + div, textChar.end, lineBottom - div) |
|
|
|
|
} |
|
|
|
|
kotlin.runCatching { |
|
|
|
|
canvas.drawBitmap(it, null, rectF, null) |
|
|
|
|
}.onFailure { e -> |
|
|
|
|
context.toastOnUi(e.localizedMessage) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|