正文阴影
This commit is contained in:
@@ -670,10 +670,10 @@ object ReadBookConfig {
|
||||
private var textColorInt = -1
|
||||
|
||||
@Transient
|
||||
private var textColorSIntNight = -1
|
||||
private var shadowColorNightInt = -1
|
||||
|
||||
@Transient
|
||||
private var textColorSInt = -1
|
||||
private var shadowColorInt = -1
|
||||
|
||||
@Transient
|
||||
private var menuBgColorInt = -1
|
||||
@@ -700,8 +700,8 @@ object ReadBookConfig {
|
||||
textColorIntEInk = textColorEInk.toColorInt()
|
||||
textColorIntNight = textColorNight.toColorInt()
|
||||
textColorInt = textColor.toColorInt()
|
||||
textColorSIntNight = shadowColorN.toColorInt()
|
||||
textColorSInt = shadowColor.toColorInt()
|
||||
shadowColorNightInt = shadowColorN.toColorInt()
|
||||
shadowColorInt = shadowColor.toColorInt()
|
||||
menuBgColorInt = menuBgColor.toColorInt()
|
||||
menuBgColorNightInt = menuBgColorNight.toColorInt()
|
||||
menuAcColorInt = menuAcColor.toColorInt()
|
||||
@@ -715,11 +715,11 @@ object ReadBookConfig {
|
||||
when {
|
||||
AppConfig.isNightTheme -> {
|
||||
shadowColorN = "#${color.hexString}"
|
||||
textColorSIntNight = color
|
||||
shadowColorNightInt = color
|
||||
}
|
||||
else -> {
|
||||
shadowColor = "#${color.hexString}"
|
||||
textColorSInt = color
|
||||
shadowColorInt = color
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -759,8 +759,8 @@ object ReadBookConfig {
|
||||
initColorInt()
|
||||
}
|
||||
return when {
|
||||
AppConfig.isNightTheme -> textColorSIntNight
|
||||
else -> textColorSInt
|
||||
AppConfig.isNightTheme -> shadowColorNightInt
|
||||
else -> shadowColorInt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ object ThemeConfig {
|
||||
initNightMode()
|
||||
BookCover.upDefaultCover()
|
||||
postEvent(EventBus.RECREATE, "")
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(2))
|
||||
}
|
||||
|
||||
fun applyDayNightInit(context: Context) {
|
||||
|
||||
@@ -1101,12 +1101,15 @@ object ChapterProvider {
|
||||
visibleRight = viewWidth - paddingRight
|
||||
visibleBottom = paddingTop + visibleHeight
|
||||
|
||||
val shadowPad = (contentPaint.shadowLayerRadius + 2).toInt()
|
||||
|
||||
visibleRect.set(
|
||||
paddingLeft.toFloat(),
|
||||
paddingTop.toFloat(),
|
||||
visibleRight.toFloat(),
|
||||
visibleBottom.toFloat()
|
||||
(paddingLeft - shadowPad).toFloat(),
|
||||
(paddingTop - shadowPad).toFloat(),
|
||||
(visibleRight + shadowPad).toFloat(),
|
||||
(visibleBottom + shadowPad).toFloat()
|
||||
)
|
||||
|
||||
//TODO: 有关测量相关问题
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user