mirror of
https://github.com/FluxaMedia/fluxa.git
synced 2026-08-18 21:18:32 +00:00
Upgrade TV card focus treatment to scale, accent ring, and glow
Replace the static 3.5dp focus border and duplicate overlay ring with the tv-material Surface focus system: 1.05 focused scale (disabled when the profile turns animations off), a 2.5dp accent border, and a soft black glow. Shelf rows stop passing no-op positioning callbacks so cards without expanded posters detach their layout listeners.
This commit is contained in:
parent
d31ed1017e
commit
a32c01faba
2 changed files with 5 additions and 16 deletions
|
|
@ -321,9 +321,6 @@ internal fun HomeShelfRow(
|
|||
expandedOffsetX = with(density) { xPx.toDp() }
|
||||
}
|
||||
},
|
||||
onFocusedPositioned = {},
|
||||
onFocusChanged = { focused ->
|
||||
},
|
||||
onResolveTrailer = onResolveTrailer
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,11 @@ internal fun TvMovieCard(
|
|||
},
|
||||
shape = ClickableSurfaceDefaults.shape(RoundedCornerShape(radius)),
|
||||
colors = ClickableSurfaceDefaults.colors(containerColor = FluxaColors.surface, focusedContainerColor = FluxaColors.surfaceRaised),
|
||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1f)
|
||||
scale = ClickableSurfaceDefaults.scale(focusedScale = if (profile?.safeAnimationsEnabled == false) 1f else 1.05f),
|
||||
border = ClickableSurfaceDefaults.border(
|
||||
focusedBorder = Border(BorderStroke(2.5.dp, Color(profile?.safeAccentColorArgb ?: 0xFFFFFFFF.toInt())), shape = RoundedCornerShape(radius))
|
||||
),
|
||||
glow = ClickableSurfaceDefaults.glow(focusedGlow = Glow(elevationColor = Color.Black.copy(alpha = 0.6f), elevation = 18.dp))
|
||||
) {
|
||||
Column(modifier = Modifier.fillMaxSize()) {
|
||||
val lang = profile?.safeLanguage ?: "en"
|
||||
|
|
@ -332,7 +336,6 @@ internal fun TvMovieCard(
|
|||
.height(imageHeight)
|
||||
.clip(RoundedCornerShape(radius))
|
||||
.background(if (isEpisodeStyle) FluxaColors.surfaceCard else Color.White.copy(alpha = FluxaDimensions.Alpha.emptyCardBackground))
|
||||
.border(3.5.dp, if (isFocused) Color(profile?.safeAccentColorArgb ?: 0xFFFFFFFF.toInt()) else Color.Transparent, RoundedCornerShape(radius))
|
||||
) {
|
||||
if (trailerUrl != null && trailerPlayer != null) {
|
||||
androidx.compose.ui.viewinterop.AndroidView(
|
||||
|
|
@ -458,16 +461,5 @@ internal fun TvMovieCard(
|
|||
}
|
||||
}
|
||||
|
||||
if (isFocused && onFocusedPositioned == null) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.align(Alignment.TopEnd)
|
||||
.width(effectiveWidth)
|
||||
.height(imageHeight)
|
||||
.zIndex(101f)
|
||||
.padding(4.dp)
|
||||
.border(3.5.dp, Color(profile?.safeAccentColorArgb ?: 0xFFFFFFFF.toInt()), RoundedCornerShape(radius))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue