[Home] Tint home playlist buttons
This commit is contained in:
parent
0521125bcd
commit
886ade241f
1 changed files with 14 additions and 4 deletions
|
@ -130,10 +130,11 @@ fun MaterialButton.accentOutlineColor() {
|
|||
|
||||
fun MaterialButton.elevatedAccentColor() {
|
||||
if (materialYou) return
|
||||
val color = ThemeStore.accentColor(context)
|
||||
val colorStateList = ColorStateList.valueOf(color)
|
||||
iconTint = colorStateList
|
||||
rippleColor = colorStateList
|
||||
val color = context.darkAccentColorVariant()
|
||||
rippleColor = ColorStateList.valueOf(color)
|
||||
setBackgroundColor(color)
|
||||
setTextColor(MaterialValueHelper.getPrimaryTextColor(context, color.isColorLight))
|
||||
iconTint = ColorStateList.valueOf(context.accentColor())
|
||||
}
|
||||
|
||||
fun SeekBar.applyColor(@ColorInt color: Int) {
|
||||
|
@ -250,5 +251,14 @@ fun Context.darkAccentColor(): Int {
|
|||
)
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
fun Context.darkAccentColorVariant(): Int {
|
||||
return ColorUtils.blendARGB(
|
||||
accentColor(),
|
||||
surfaceColor(),
|
||||
if (surfaceColor().isColorLight) 0.9f else 0.95f
|
||||
)
|
||||
}
|
||||
|
||||
inline val @receiver:ColorInt Int.isColorLight
|
||||
get() = ColorUtil.isColorLight(this)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue