mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Tweak library continue reading button
This commit is contained in:
parent
340357d158
commit
c76d5dd30c
1 changed files with 21 additions and 21 deletions
|
@ -48,7 +48,7 @@ object CommonMangaItemDefaults {
|
||||||
const val BrowseFavoriteCoverAlpha = 0.34f
|
const val BrowseFavoriteCoverAlpha = 0.34f
|
||||||
}
|
}
|
||||||
|
|
||||||
private val ContinueReadingButtonSize = 38.dp
|
private val ContinueReadingButtonSize = 32.dp
|
||||||
private const val GridSelectedCoverAlpha = 0.76f
|
private const val GridSelectedCoverAlpha = 0.76f
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -119,10 +119,10 @@ private fun BoxScope.CoverTextOverlay(
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.align(Alignment.BottomCenter),
|
.align(Alignment.BottomCenter),
|
||||||
)
|
)
|
||||||
val endPadding = if (showContinueReadingButton) ContinueReadingButtonSize else 8.dp
|
val endPadding = if (showContinueReadingButton) ContinueReadingButtonSize else 0.dp
|
||||||
GridItemTitle(
|
GridItemTitle(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(start = 8.dp, top = 8.dp, end = endPadding, bottom = 8.dp)
|
.padding(start = 8.dp, top = 8.dp, end = endPadding + 8.dp, bottom = 8.dp)
|
||||||
.align(Alignment.BottomStart),
|
.align(Alignment.BottomStart),
|
||||||
title = title,
|
title = title,
|
||||||
style = MaterialTheme.typography.titleSmall.copy(
|
style = MaterialTheme.typography.titleSmall.copy(
|
||||||
|
@ -355,25 +355,25 @@ fun MangaListItem(
|
||||||
private fun BoxScope.ContinueReadingButton(
|
private fun BoxScope.ContinueReadingButton(
|
||||||
onClickContinueReading: () -> Unit,
|
onClickContinueReading: () -> Unit,
|
||||||
) {
|
) {
|
||||||
FilledIconButton(
|
Box(
|
||||||
onClick = {
|
|
||||||
onClickContinueReading()
|
|
||||||
},
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(ContinueReadingButtonSize)
|
.align(Alignment.BottomEnd)
|
||||||
.padding(3.dp)
|
.padding(horizontal = 4.dp, vertical = 8.dp),
|
||||||
.align(Alignment.BottomEnd),
|
) {
|
||||||
|
FilledIconButton(
|
||||||
|
onClick = onClickContinueReading,
|
||||||
|
modifier = Modifier.size(ContinueReadingButtonSize),
|
||||||
shape = MaterialTheme.shapes.small,
|
shape = MaterialTheme.shapes.small,
|
||||||
colors = IconButtonDefaults.filledIconButtonColors(
|
colors = IconButtonDefaults.filledIconButtonColors(
|
||||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
containerColor = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f),
|
||||||
contentColor = contentColorFor(MaterialTheme.colorScheme.primaryContainer),
|
contentColor = contentColorFor(MaterialTheme.colorScheme.primaryContainer),
|
||||||
),
|
),
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Filled.PlayArrow,
|
imageVector = Icons.Filled.PlayArrow,
|
||||||
contentDescription = "",
|
contentDescription = "",
|
||||||
modifier = Modifier
|
modifier = Modifier.size(16.dp),
|
||||||
.size(15.dp),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue