Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/src/main/java/helium314/keyboard/latin/common/Colors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ class DynamicColors(context: Context, override val themeStyle: String, override
}
adjustedBackgroundStateList =
if (themeStyle == STYLE_HOLO) {
pressedStateList(accent, adjustedBackground)
// in dark mode the popup selection highlight (system_accent1_100) is glaringly light;
// dim it, matching how the Material night popup already uses a darkened accent
pressedStateList(if (isNight) doubleAdjustedAccent else accent, adjustedBackground)
} else if (isNight) {
if (hasKeyBorders) pressedStateList(doubleAdjustedAccent, keyBackground)
else pressedStateList(adjustedAccent, adjustedKeyBackground)
Expand Down Expand Up @@ -415,7 +417,9 @@ class DefaultColors (
adjustedBackground = darken(background)
doubleAdjustedBackground = darken(adjustedBackground)
}
adjustedBackgroundStateList = pressedStateList(doubleAdjustedBackground, adjustedBackground)
// popup selection highlight uses the theme accent so it is clearly noticeable (#2440),
// consistent with the dynamic theme, instead of the barely-visible doubleAdjustedBackground
adjustedBackgroundStateList = pressedStateList(accent, adjustedBackground)

val stripBackground: Int
val pressedStripElementBackground: Int
Expand Down