[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() {
|
fun MaterialButton.elevatedAccentColor() {
|
||||||
if (materialYou) return
|
if (materialYou) return
|
||||||
val color = ThemeStore.accentColor(context)
|
val color = context.darkAccentColorVariant()
|
||||||
val colorStateList = ColorStateList.valueOf(color)
|
rippleColor = ColorStateList.valueOf(color)
|
||||||
iconTint = colorStateList
|
setBackgroundColor(color)
|
||||||
rippleColor = colorStateList
|
setTextColor(MaterialValueHelper.getPrimaryTextColor(context, color.isColorLight))
|
||||||
|
iconTint = ColorStateList.valueOf(context.accentColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun SeekBar.applyColor(@ColorInt color: Int) {
|
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
|
inline val @receiver:ColorInt Int.isColorLight
|
||||||
get() = ColorUtil.isColorLight(this)
|
get() = ColorUtil.isColorLight(this)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue