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