Fix paddings in Grid View

This commit is contained in:
skoruppa 2026-03-17 07:27:25 +01:00
parent 579cb25cd7
commit a8bc528f09
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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,