From 0ac38dce43d16208672239969a4c8ff4e2eae3cb Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Sun, 19 Jul 2026 03:15:02 +0530 Subject: [PATCH] fix: apply poster depth to remaining surfaces --- composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt | 2 ++ .../com/nuvio/app/core/ui/PosterZoomActionOverlay.kt | 8 +++++++- .../com/nuvio/app/features/catalog/CatalogScreen.kt | 6 ++++++ .../com/nuvio/app/features/details/MetaDetailsScreen.kt | 2 ++ .../features/home/components/HomeCollectionRowSection.kt | 8 +++++++- .../home/components/HomeContinueWatchingSection.kt | 4 ++++ .../com/nuvio/app/features/home/components/PosterGrid.kt | 6 ++++++ 7 files changed, 34 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt index aca9874aa..94a991150 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt @@ -101,6 +101,7 @@ import com.nuvio.app.core.ui.NuvioNavBarScrollState import com.nuvio.app.core.ui.rememberNuvioNavBarScrollState import com.nuvio.app.core.format.formatReleaseDateForDisplay import com.nuvio.app.core.ui.NuvioContinueWatchingActionSheet +import com.nuvio.app.core.ui.NuvioCardDepthSurface import com.nuvio.app.core.ui.NuvioPosterZoomActionOverlay import com.nuvio.app.core.ui.PosterZoomAnchor import com.nuvio.app.core.ui.PosterZoomAnchorHolder @@ -3386,6 +3387,7 @@ private fun MainAppContent( imageUrl = cloudLibraryDisplayArtworkUrl(anchor.imageUrl ?: item.poster ?: item.imageUrl), title = item.title, subtitle = localizedContinueWatchingSubtitle(item), + depthSurface = NuvioCardDepthSurface.ContinueWatching, anchor = anchor, actions = buildList { if (showDetailsOption) { diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/core/ui/PosterZoomActionOverlay.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/core/ui/PosterZoomActionOverlay.kt index 34bb8ee3d..9629e7f2e 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/core/ui/PosterZoomActionOverlay.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/core/ui/PosterZoomActionOverlay.kt @@ -129,6 +129,7 @@ fun NuvioPosterZoomActionOverlay( title: String, subtitle: String?, isWatched: Boolean = false, + depthSurface: NuvioCardDepthSurface = NuvioCardDepthSurface.Posters, anchor: PosterZoomAnchor?, actions: List, hazeState: HazeState, @@ -136,6 +137,7 @@ fun NuvioPosterZoomActionOverlay( modifier: Modifier = Modifier, ) { val tokens = MaterialTheme.nuvio + val previewShape = RoundedCornerShape(PosterZoomFinalCornerRadius) val hapticFeedback = LocalHapticFeedback.current val scope = rememberCoroutineScope() @@ -385,7 +387,11 @@ fun NuvioPosterZoomActionOverlay( shape = RoundedCornerShape(posterCornerRadiusPx(anchor, clamped, scale)) clip = true } - .background(tokens.colors.surfaceCard), + .background(tokens.colors.surfaceCard) + .nuvioCardDepth( + shape = previewShape, + surface = depthSurface, + ), contentAlignment = Alignment.Center, ) { if (imageUrl != null) { diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/catalog/CatalogScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/catalog/CatalogScreen.kt index c11312d5e..816c175d0 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/catalog/CatalogScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/catalog/CatalogScreen.kt @@ -50,7 +50,9 @@ import com.nuvio.app.core.ui.NuvioNetworkOfflineCard import coil3.compose.AsyncImage import com.nuvio.app.core.format.formatReleaseDateForDisplay import com.nuvio.app.core.ui.NuvioBackButton +import com.nuvio.app.core.ui.NuvioCardDepthSurface import com.nuvio.app.core.ui.NuvioPosterWatchedOverlay +import com.nuvio.app.core.ui.nuvioCardDepth import com.nuvio.app.core.ui.rememberPosterCardStyleUiState import com.nuvio.app.core.ui.posterCardClickable import com.nuvio.app.core.ui.nuvioSafeBottomPadding @@ -304,6 +306,10 @@ private fun CatalogPosterTile( .aspectRatio(item.posterShape.catalogAspectRatio()) .clip(RoundedCornerShape(cornerRadiusDp.dp)) .background(MaterialTheme.colorScheme.surface) + .nuvioCardDepth( + shape = RoundedCornerShape(cornerRadiusDp.dp), + surface = NuvioCardDepthSurface.Posters, + ) .posterCardClickable( onClick = onClick, onLongClick = onLongClick, diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/MetaDetailsScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/MetaDetailsScreen.kt index 5f335f2ad..44911c48e 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/MetaDetailsScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/MetaDetailsScreen.kt @@ -76,6 +76,7 @@ import com.nuvio.app.core.network.NetworkCondition import com.nuvio.app.core.network.NetworkStatusRepository import com.nuvio.app.core.i18n.localizedSeasonEpisodeCode import com.nuvio.app.core.ui.NuvioBackButton +import com.nuvio.app.core.ui.NuvioCardDepthSurface import com.nuvio.app.core.ui.NuvioPosterZoomActionOverlay import com.nuvio.app.core.ui.PosterZoomAnchor import com.nuvio.app.core.ui.PosterZoomAnchorHolder @@ -1339,6 +1340,7 @@ fun MetaDetailsScreen( title = selectedEpisode.title, subtitle = localizedSeasonEpisodeCode(selectedEpisode.season, selectedEpisode.episode) ?: seasonLabel, isWatched = isSelectedEpisodeWatched, + depthSurface = NuvioCardDepthSurface.EpisodeCards, anchor = zoomAnchor, actions = buildList { add( diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeCollectionRowSection.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeCollectionRowSection.kt index da63fe5d1..e174a4923 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeCollectionRowSection.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeCollectionRowSection.kt @@ -26,9 +26,11 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.nuvio.app.core.ui.NuvioCardDepthSurface import com.nuvio.app.core.ui.NuvioShelfSection import com.nuvio.app.core.ui.PosterLandscapeAspectRatio import com.nuvio.app.core.ui.landscapePosterWidth +import com.nuvio.app.core.ui.nuvioCardDepth import com.nuvio.app.core.ui.posterCardClickable import com.nuvio.app.core.ui.rememberPosterCardStyleUiState import com.nuvio.app.features.collection.Collection @@ -134,7 +136,11 @@ private fun CollectionFolderCard( Card( modifier = Modifier .fillMaxWidth() - .aspectRatio(aspectRatio), + .aspectRatio(aspectRatio) + .nuvioCardDepth( + shape = shapeCorner, + surface = NuvioCardDepthSurface.Posters, + ), shape = shapeCorner, colors = CardDefaults.cardColors( containerColor = MaterialTheme.colorScheme.surface, diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt index 2ad956799..d088bee10 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt @@ -1023,6 +1023,10 @@ private fun ContinueWatchingPosterCard( .height(layout.posterCardHeight) .clip(RoundedCornerShape(layout.cardRadius)) .background(MaterialTheme.colorScheme.surfaceVariant) + .nuvioCardDepth( + shape = RoundedCornerShape(layout.cardRadius), + surface = NuvioCardDepthSurface.ContinueWatching, + ) .posterCardClickable( onClick = onClick, onLongClick = onLongClick, diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/PosterGrid.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/PosterGrid.kt index 41c3484fc..7674f250f 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/PosterGrid.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/PosterGrid.kt @@ -25,7 +25,9 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import coil3.compose.AsyncImage import com.nuvio.app.core.format.formatReleaseDateForDisplay +import com.nuvio.app.core.ui.NuvioCardDepthSurface import com.nuvio.app.core.ui.NuvioPosterWatchedOverlay +import com.nuvio.app.core.ui.nuvioCardDepth import com.nuvio.app.core.ui.posterCardClickable import com.nuvio.app.core.ui.rememberPosterCardStyleUiState import com.nuvio.app.features.home.MetaPreview @@ -123,6 +125,10 @@ private fun PosterGridTile( .aspectRatio(item.posterShape.posterGridAspectRatio()) .clip(RoundedCornerShape(cornerRadiusDp.dp)) .background(MaterialTheme.colorScheme.surface) + .nuvioCardDepth( + shape = RoundedCornerShape(cornerRadiusDp.dp), + surface = NuvioCardDepthSurface.Posters, + ) .posterCardClickable( onClick = onClick, onLongClick = onLongClick,