增加纯黑暗色模式,清理代码
This commit is contained in:
34 files changed
+848
-459
No files matched your search
@@ -91,10 +91,14 @@ class ThemeCardPreference(context: Context, attrs: AttributeSet) : Preference(co
|
||||
"1" to R.style.Theme_Base_GR,
|
||||
"2" to R.style.Theme_Base_Lemon,
|
||||
"3" to R.style.Theme_Base_WH,
|
||||
"4" to R.style.Theme_Base_Koharu,
|
||||
"5" to R.style.Theme_Base_Yuuka,
|
||||
"6" to R.style.Theme_Base_Phoebe,
|
||||
"7" to R.style.AppTheme_Transparent
|
||||
"4" to R.style.Theme_Base_Sora,
|
||||
"5" to R.style.Theme_Base_August,
|
||||
"6" to R.style.Theme_Base_Carlotta,
|
||||
"7" to R.style.Theme_Base_Koharu,
|
||||
"8" to R.style.Theme_Base_Yuuka,
|
||||
"9" to R.style.Theme_Base_Phoebe,
|
||||
"10" to R.style.Theme_Base_Mujika,
|
||||
"11" to R.style.AppTheme_Transparent
|
||||
)
|
||||
|
||||
private fun getThemeColors(value: String): List<Int> {
|
||||
|
||||
@@ -3,15 +3,14 @@ package io.legato.kazusa.lib.theme
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.graphics.Color
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.CheckResult
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.toColorInt
|
||||
import io.legato.kazusa.utils.ColorUtils
|
||||
import splitties.init.appCtx
|
||||
import androidx.core.graphics.toColorInt
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad), Karim Abou Zeid (kabouzeid)
|
||||
@@ -208,7 +207,7 @@ private constructor(private val mContext: Context) : ThemeStoreInterface {
|
||||
ThemeUtils.resolveColor(
|
||||
context,
|
||||
androidx.appcompat.R.attr.colorPrimaryDark,
|
||||
Color.parseColor("#37474F")
|
||||
"#37474F".toColorInt()
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -221,7 +220,7 @@ private constructor(private val mContext: Context) : ThemeStoreInterface {
|
||||
ThemeUtils.resolveColor(
|
||||
context,
|
||||
androidx.appcompat.R.attr.colorAccent,
|
||||
Color.parseColor("#263238")
|
||||
"#263238".toColorInt()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ package io.legato.kazusa.lib.theme
|
||||
* @author Aidan Follestad (afollestad), Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
object ThemeStorePrefKeys {
|
||||
const val KEY_DYNAMIC_COLORS_ENABLED = ""
|
||||
|
||||
const val CONFIG_PREFS_KEY_DEFAULT = "app_themes"
|
||||
const val IS_CONFIGURED_KEY = "is_configured"
|
||||
@@ -29,9 +28,4 @@ object ThemeStorePrefKeys {
|
||||
const val KEY_APPLY_PRIMARY_NAVBAR = "apply_primary_navbar"
|
||||
const val KEY_AUTO_GENERATE_PRIMARYDARK = "auto_generate_primarydark"
|
||||
|
||||
const val KEY_COLOR_PRIMARY = "key_color_primary"
|
||||
const val KEY_COLOR_ON_PRIMARY = "key_color_on_primary"
|
||||
const val KEY_COLOR_PRIMARY_CONTAINER = "key_color_primary_container"
|
||||
const val KEY_COLOR_ON_PRIMARY_CONTAINER = "key_color_on_primary_container"
|
||||
const val KEY_COLOR_SECONDARY = "key_color_secondary"
|
||||
}
|
||||
Reference in new issue
Block a user