mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-25 11:22:20 +00:00
better choice of color for deactivated toolbar key
This commit is contained in:
parent
833aa321b9
commit
79c9a85082
1 changed files with 10 additions and 2 deletions
|
@ -150,7 +150,11 @@ class DynamicColors(context: Context, override val themeStyle: String, override
|
|||
private val spaceBarStateList: ColorStateList
|
||||
private val adjustedBackgroundStateList: ColorStateList
|
||||
private val stripBackgroundList: ColorStateList
|
||||
private val toolbarKeyStateList = activatedStateList(keyText, darken(darken(keyText)))
|
||||
private val toolbarKeyStateList = activatedStateList(
|
||||
keyText,
|
||||
if (isBrightColor(keyText)) darken(darken(keyText))
|
||||
else brighten(brighten(keyText))
|
||||
)
|
||||
|
||||
/** darkened variant of [accent] because the accent color is always light for dynamic colors */
|
||||
private val adjustedAccent: Int = darken(accent)
|
||||
|
@ -398,7 +402,11 @@ class DefaultColors (
|
|||
private val spaceBarStateList: ColorStateList
|
||||
private val adjustedBackgroundStateList: ColorStateList
|
||||
private val stripBackgroundList: ColorStateList
|
||||
private val toolbarKeyStateList = activatedStateList(suggestionText, darken(darken(suggestionText)))
|
||||
private val toolbarKeyStateList = activatedStateList(
|
||||
suggestionText,
|
||||
if (isBrightColor(suggestionText)) darken(darken(suggestionText))
|
||||
else brighten(brighten(suggestionText))
|
||||
)
|
||||
private var backgroundSetupDone = false
|
||||
|
||||
init {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue