pull/32/head
kunfei 5 years ago
parent 193939d1ec
commit 71d0b7ceb2
  1. 8
      app/src/main/java/io/legado/app/help/ReadBookConfig.kt
  2. 6
      app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt

@ -139,6 +139,14 @@ object ReadBookConfig {
} }
} }
fun statusIconDark(): Boolean {
return if (App.INSTANCE.isNightTheme) {
darkStatusIconNight
} else {
darkStatusIcon
}
}
fun textColor(): Int { fun textColor(): Int {
return if (App.INSTANCE.isNightTheme) Color.parseColor(textColorNight) return if (App.INSTANCE.isNightTheme) Color.parseColor(textColorNight)
else Color.parseColor(textColor) else Color.parseColor(textColor)

@ -8,7 +8,9 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import io.legado.app.R import io.legado.app.R
import io.legado.app.help.ReadBookConfig
import io.legado.app.ui.readbook.Help import io.legado.app.ui.readbook.Help
import kotlinx.android.synthetic.main.dialog_read_bg_text.*
class BgTextConfigDialog : DialogFragment() { class BgTextConfigDialog : DialogFragment() {
@ -41,7 +43,7 @@ class BgTextConfigDialog : DialogFragment() {
initData() initData()
} }
private fun initData() { private fun initData() = with(ReadBookConfig.getConfig()) {
sw_dark_status_icon.isChecked = statusIconDark()
} }
} }
Loading…
Cancel
Save