mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-19 13:49:13 +00:00
Restored pin icon color for material style (#196)
* Pin icon uses accent color for both styles
This commit is contained in:
parent
4baca025f9
commit
a5fde31ca2
2 changed files with 1 additions and 5 deletions
|
@ -68,7 +68,7 @@ class ClipboardAdapter(
|
||||||
}
|
}
|
||||||
clipboardLayoutParams.setItemProperties(view)
|
clipboardLayoutParams.setItemProperties(view)
|
||||||
val colors = Settings.getInstance().current.mColors
|
val colors = Settings.getInstance().current.mColors
|
||||||
pinnedIconView.colorFilter = colors.clipboardPinFilter
|
pinnedIconView.colorFilter = colors.accentColorFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setContent(historyEntry: ClipboardHistoryEntry?) {
|
fun setContent(historyEntry: ClipboardHistoryEntry?) {
|
||||||
|
|
|
@ -56,8 +56,6 @@ class Colors (
|
||||||
val accentColorFilter: ColorFilter
|
val accentColorFilter: ColorFilter
|
||||||
/** color filter for the white action key icons in material theme, switches to gray if necessary for contrast */
|
/** color filter for the white action key icons in material theme, switches to gray if necessary for contrast */
|
||||||
val actionKeyIconColorFilter: ColorFilter?
|
val actionKeyIconColorFilter: ColorFilter?
|
||||||
/** color filter for the clipboard pin, used only in holo theme */
|
|
||||||
val clipboardPinFilter: ColorFilter?
|
|
||||||
|
|
||||||
private val backgroundStateList: ColorStateList
|
private val backgroundStateList: ColorStateList
|
||||||
private val keyStateList: ColorStateList
|
private val keyStateList: ColorStateList
|
||||||
|
@ -77,12 +75,10 @@ class Colors (
|
||||||
navBar = darkerBackground
|
navBar = darkerBackground
|
||||||
keyboardBackground = GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, intArrayOf(background, darkerBackground))
|
keyboardBackground = GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, intArrayOf(background, darkerBackground))
|
||||||
spaceBarText = keyText
|
spaceBarText = keyText
|
||||||
clipboardPinFilter = accentColorFilter
|
|
||||||
} else {
|
} else {
|
||||||
navBar = background
|
navBar = background
|
||||||
keyboardBackground = null
|
keyboardBackground = null
|
||||||
spaceBarText = keyHintText
|
spaceBarText = keyHintText
|
||||||
clipboardPinFilter = null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// create color filters, todo: maybe better / simplify
|
// create color filters, todo: maybe better / simplify
|
||||||
|
|
Loading…
Add table
Reference in a new issue