Improve menu icon colors

This commit is contained in:
vfsfitvnm 2022-08-28 12:49:52 +02:00
parent c4122ddd9c
commit ac0bc125e4
2 changed files with 12 additions and 4 deletions

View file

@ -28,6 +28,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import it.vfsfitvnm.vimusic.R
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
import it.vfsfitvnm.vimusic.ui.styling.menuEntryIcon
import it.vfsfitvnm.vimusic.utils.medium
import it.vfsfitvnm.vimusic.utils.secondary
@ -78,9 +79,9 @@ fun MenuEntry(
Image(
painter = painterResource(icon),
contentDescription = null,
colorFilter = ColorFilter.tint(colorPalette.text),
colorFilter = ColorFilter.tint(colorPalette.menuEntryIcon),
modifier = Modifier
.size(14.dp)
.size(15.dp)
)
Column {

View file

@ -29,7 +29,7 @@ val DefaultDarkColorPalette = ColorPalette(
text = Color(0xffe1e1e2),
textSecondary = Color(0xffa3a4a6),
textDisabled = Color(0xff6f6f73),
accent = Color(0xff4046bf),
accent = Color(0xff5055c0),
onAccent = Color.White,
isDark = true
)
@ -41,7 +41,7 @@ val DefaultLightColorPalette = ColorPalette(
text = Color(0xff212121),
textSecondary = Color(0xff656566),
textDisabled = Color(0xff9d9d9d),
accent = Color(0xff4046bf),
accent = Color(0xff5055c0),
onAccent = Color.White,
isDark = false
)
@ -133,6 +133,13 @@ inline val ColorPalette.shimmer: Color
accent
}
inline val ColorPalette.menuEntryIcon: Color
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this == PureBlackColorPalette) {
text
} else {
accent
}
inline val ColorPalette.overlay: Color
get() = PureBlackColorPalette.background0.copy(alpha = 0.75f)