mirror of
https://github.com/gedoor/legado.git
synced 2024-07-02 23:17:32 +08:00
优化
This commit is contained in:
parent
27571f5b06
commit
a2cc621917
|
@ -303,9 +303,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||
if (bookChanged) {
|
||||
bookChanged = false
|
||||
ReadBook.callBack = this
|
||||
viewModel.initData(intent) {
|
||||
upMenu()
|
||||
}
|
||||
viewModel.initData(intent)
|
||||
} else {
|
||||
//web端阅读时,app处于阅读界面,本地记录会覆盖web保存的进度,在此处恢复
|
||||
ReadBook.webBookProgress?.let {
|
||||
|
|
|
@ -159,6 +159,7 @@ class MoreConfigDialog : DialogFragment() {
|
|||
}
|
||||
|
||||
PreferKey.optimizeRender -> {
|
||||
ChapterProvider.upStyle()
|
||||
ReadBook.callBack?.upPageAnim(true)
|
||||
ReadBook.loadContent(false)
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ class ReadStyleDialog : BaseDialogFragment(R.layout.dialog_read_book_style),
|
|||
override fun selectFont(path: String) {
|
||||
if (path != ReadBookConfig.textFont) {
|
||||
ReadBookConfig.textFont = path
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(2, 5))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -881,7 +881,9 @@ object ChapterProvider {
|
|||
tPaint.typeface = titleFont
|
||||
tPaint.textSize = with(ReadBookConfig) { textSize + titleSize }.toFloat().spToPx()
|
||||
tPaint.isAntiAlias = true
|
||||
tPaint.isLinearText = true
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && AppConfig.optimizeRender) {
|
||||
tPaint.isLinearText = true
|
||||
}
|
||||
//正文
|
||||
val cPaint = TextPaint()
|
||||
cPaint.color = ReadBookConfig.textColor
|
||||
|
@ -889,7 +891,9 @@ object ChapterProvider {
|
|||
cPaint.typeface = textFont
|
||||
cPaint.textSize = ReadBookConfig.textSize.toFloat().spToPx()
|
||||
cPaint.isAntiAlias = true
|
||||
cPaint.isLinearText = true
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && AppConfig.optimizeRender) {
|
||||
cPaint.isLinearText = true
|
||||
}
|
||||
return Pair(tPaint, cPaint)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user