feat: E-Ink模式合并到主题模式里, E-Ink模式不能修改阅读界面背景和文字颜色

pull/254/head
gedoor 4 years ago
parent f5279f92b4
commit f71e18c164
  1. 1
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  2. 7
      app/src/main/java/io/legado/app/help/AppConfig.kt
  3. 1
      app/src/main/res/values-zh-rHK/arrays.xml
  4. 1
      app/src/main/res/values-zh-rTW/arrays.xml
  5. 1
      app/src/main/res/values/array_values.xml
  6. 1
      app/src/main/res/values/arrays.xml
  7. 8
      app/src/main/res/xml/pref_main.xml

@ -43,7 +43,6 @@ object PreferKey {
const val readStyleSelect = "readStyleSelect"
const val systemTypefaces = "system_typefaces"
const val readBodyToLh = "readBodyToLh"
const val eInkMode = "isEInkMode"
const val textFullJustify = "textFullJustify"
const val autoReadSpeed = "autoReadSpeed"

@ -13,6 +13,7 @@ object AppConfig {
return when (context.getPrefString(PreferKey.themeMode, "0")) {
"1" -> false
"2" -> true
"3" -> false
else -> context.sysIsDarkMode()
}
}
@ -27,6 +28,9 @@ object AppConfig {
}
}
val isEInkMode: Boolean
get() = App.INSTANCE.getPrefString(PreferKey.themeMode) == "3"
var isTransparentStatusBar: Boolean
get() = App.INSTANCE.getPrefBoolean("transparentStatusBar")
set(value) {
@ -80,9 +84,6 @@ object AppConfig {
val ttsSpeechPer: String
get() = App.INSTANCE.getPrefString(PreferKey.ttsSpeechPer) ?: "0"
val isEInkMode: Boolean
get() = App.INSTANCE.getPrefBoolean(PreferKey.eInkMode)
val clickAllNext: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false)
var chineseConverterType: Int

@ -20,6 +20,7 @@
<item>跟隨系統</item>
<item>亮色主題</item>
<item>暗色主題</item>
<item>E-Ink(墨水屏)</item>
</string-array>
<string-array name="NavBarColors">

@ -44,6 +44,7 @@
<item>跟隨系統</item>
<item>亮色主題</item>
<item>暗色主題</item>
<item>E-Ink(墨水屏)</item>
</string-array>
<string-array name="NavBarColors">

@ -23,6 +23,7 @@
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="tts_speech_per_value">

@ -44,6 +44,7 @@
<item>跟随系统</item>
<item>亮色主题</item>
<item>暗色主题</item>
<item>E-Ink(墨水屏)</item>
</string-array>
<string-array name="NavBarColors">

@ -30,14 +30,6 @@
android:icon="@drawable/ic_cfg_theme"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_cfg_e_lnk"
android:key="isEInkMode"
android:summary="@string/eink_theme_desc"
android:title="@string/eink_theme"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false"
android:key="webService"

Loading…
Cancel
Save