Fix #408
This commit is contained in:
parent
12f8b6fbcb
commit
38e46db354
4 changed files with 16 additions and 6 deletions
|
@ -15,6 +15,7 @@ import androidx.compose.ui.graphics.ColorFilter
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
|
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
|
||||||
|
import it.vfsfitvnm.vimusic.ui.styling.primaryButton
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun PrimaryButton(
|
fun PrimaryButton(
|
||||||
|
@ -29,7 +30,7 @@ fun PrimaryButton(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.clip(RoundedCornerShape(16.dp))
|
.clip(RoundedCornerShape(16.dp))
|
||||||
.clickable(enabled = enabled, onClick = onClick)
|
.clickable(enabled = enabled, onClick = onClick)
|
||||||
.background(colorPalette.background2)
|
.background(colorPalette.primaryButton)
|
||||||
.size(62.dp)
|
.size(62.dp)
|
||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
|
|
|
@ -15,6 +15,7 @@ import androidx.compose.ui.graphics.ColorFilter
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
|
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
|
||||||
|
import it.vfsfitvnm.vimusic.ui.styling.primaryButton
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SecondaryButton(
|
fun SecondaryButton(
|
||||||
|
@ -29,7 +30,7 @@ fun SecondaryButton(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.clickable(enabled = enabled, onClick = onClick)
|
.clickable(enabled = enabled, onClick = onClick)
|
||||||
.background(colorPalette.background2)
|
.background(colorPalette.primaryButton)
|
||||||
.size(48.dp)
|
.size(48.dp)
|
||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
|
|
|
@ -10,6 +10,7 @@ import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
|
import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance
|
||||||
|
import it.vfsfitvnm.vimusic.ui.styling.primaryButton
|
||||||
import it.vfsfitvnm.vimusic.utils.medium
|
import it.vfsfitvnm.vimusic.utils.medium
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
@ -28,7 +29,7 @@ fun SecondaryTextButton(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.clip(RoundedCornerShape(16.dp))
|
.clip(RoundedCornerShape(16.dp))
|
||||||
.clickable(enabled = enabled, onClick = onClick)
|
.clickable(enabled = enabled, onClick = onClick)
|
||||||
.background(if (alternative) colorPalette.background0 else colorPalette.background2)
|
.background(if (alternative) colorPalette.background0 else colorPalette.primaryButton)
|
||||||
.padding(all = 8.dp)
|
.padding(all = 8.dp)
|
||||||
.padding(horizontal = 8.dp)
|
.padding(horizontal = 8.dp)
|
||||||
)
|
)
|
||||||
|
|
|
@ -113,26 +113,33 @@ private fun dynamicColorPaletteOf(hsl: FloatArray, isDark: Boolean): ColorPalett
|
||||||
}
|
}
|
||||||
|
|
||||||
inline val ColorPalette.collapsedPlayerProgressBar: Color
|
inline val ColorPalette.collapsedPlayerProgressBar: Color
|
||||||
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this == PureBlackColorPalette) {
|
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this === PureBlackColorPalette) {
|
||||||
text
|
text
|
||||||
} else {
|
} else {
|
||||||
accent
|
accent
|
||||||
}
|
}
|
||||||
|
|
||||||
inline val ColorPalette.favoritesIcon: Color
|
inline val ColorPalette.favoritesIcon: Color
|
||||||
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this == PureBlackColorPalette) {
|
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this === PureBlackColorPalette) {
|
||||||
red
|
red
|
||||||
} else {
|
} else {
|
||||||
accent
|
accent
|
||||||
}
|
}
|
||||||
|
|
||||||
inline val ColorPalette.shimmer: Color
|
inline val ColorPalette.shimmer: Color
|
||||||
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this == PureBlackColorPalette) {
|
get() = if (this === DefaultDarkColorPalette || this === DefaultLightColorPalette || this === PureBlackColorPalette) {
|
||||||
Color(0xff838383)
|
Color(0xff838383)
|
||||||
} else {
|
} else {
|
||||||
accent
|
accent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline val ColorPalette.primaryButton: Color
|
||||||
|
get() = if (this === PureBlackColorPalette) {
|
||||||
|
Color(0xFF272727)
|
||||||
|
} else {
|
||||||
|
background2
|
||||||
|
}
|
||||||
|
|
||||||
inline val ColorPalette.overlay: Color
|
inline val ColorPalette.overlay: Color
|
||||||
get() = PureBlackColorPalette.background0.copy(alpha = 0.75f)
|
get() = PureBlackColorPalette.background0.copy(alpha = 0.75f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue