Fix paddings in Grid View
This commit is contained in:
parent
579cb25cd7
commit
a8bc528f09
2 changed files with 5 additions and 4 deletions
|
|
@ -138,7 +138,7 @@ fun HeroCarousel(
|
|||
label = "heroSlide"
|
||||
) { index ->
|
||||
val item = items.getOrNull(index) ?: return@Crossfade
|
||||
HeroCarouselSlide(item = item)
|
||||
HeroCarouselSlide(item = item, compactPadding = fullWidth != Dp.Unspecified)
|
||||
}
|
||||
|
||||
// Indicator dots — pre-compute colors + shape to avoid reallocation per dot
|
||||
|
|
@ -182,7 +182,8 @@ fun HeroCarousel(
|
|||
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||
@Composable
|
||||
private fun HeroCarouselSlide(
|
||||
item: MetaPreview
|
||||
item: MetaPreview,
|
||||
compactPadding: Boolean = false
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val density = LocalDensity.current
|
||||
|
|
@ -267,7 +268,7 @@ private fun HeroCarouselSlide(
|
|||
Column(
|
||||
modifier = Modifier
|
||||
.align(Alignment.BottomStart)
|
||||
.padding(start = 48.dp, bottom = 48.dp, end = 48.dp)
|
||||
.padding(start = if (compactPadding) 24.dp else 48.dp, bottom = 48.dp, end = 48.dp)
|
||||
.fillMaxWidth(0.5f)
|
||||
) {
|
||||
// Title logo or text title
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ private fun StickyCategoryHeader(
|
|||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.background(headerGradient)
|
||||
.padding(horizontal = 48.dp, vertical = 12.dp)
|
||||
.padding(start = 24.dp, top = 12.dp, bottom = 12.dp)
|
||||
) {
|
||||
Text(
|
||||
text = sectionName,
|
||||
|
|
|
|||
Loading…
Reference in a new issue