From d40c6d59b33c0579c9930341897985156edcd187 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 24 Jul 2026 11:27:39 +0800 Subject: [PATCH] fix(date-recorder): preserve rounded corners during shared element view mode transition --- .../main/kotlin/plus/rua/project/ui/DateRecorderScreen.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/plus/rua/project/ui/DateRecorderScreen.kt b/core/src/main/kotlin/plus/rua/project/ui/DateRecorderScreen.kt index 5ed7986..ce1cf9b 100644 --- a/core/src/main/kotlin/plus/rua/project/ui/DateRecorderScreen.kt +++ b/core/src/main/kotlin/plus/rua/project/ui/DateRecorderScreen.kt @@ -959,6 +959,7 @@ private fun SharedTransitionScope.TimelineRecordCard( elevation = CardDefaults.cardElevation(defaultElevation = 1.dp), modifier = modifier .fillMaxWidth() + .clip(RoundedCornerShape(16.dp)) .sharedBounds( sharedContentState = rememberSharedContentState(key = "card_${record.id}"), animatedVisibilityScope = animatedVisibilityScope @@ -1079,6 +1080,7 @@ private fun SharedTransitionScope.GridRecordCard( elevation = CardDefaults.cardElevation(defaultElevation = 1.dp), modifier = modifier .fillMaxWidth() + .clip(RoundedCornerShape(14.dp)) .sharedBounds( sharedContentState = rememberSharedContentState(key = "card_${record.id}"), animatedVisibilityScope = animatedVisibilityScope @@ -1096,6 +1098,7 @@ private fun SharedTransitionScope.GridRecordCard( modifier = Modifier .fillMaxWidth() .aspectRatio(1f) + .clip(RoundedCornerShape(14.dp)) .sharedElement( sharedContentState = rememberSharedContentState(key = "photo_${record.id}"), animatedVisibilityScope = animatedVisibilityScope @@ -1184,9 +1187,9 @@ private fun SharedTransitionScope.CompactRecordCard( onClick = onClick, shape = RoundedCornerShape(8.dp), border = BorderStroke(borderWidth, MaterialTheme.colorScheme.primary), - elevation = CardDefaults.cardElevation(defaultElevation = 0.dp), modifier = modifier .fillMaxWidth() + .clip(RoundedCornerShape(8.dp)) .sharedBounds( sharedContentState = rememberSharedContentState(key = "card_${record.id}"), animatedVisibilityScope = animatedVisibilityScope @@ -1204,6 +1207,7 @@ private fun SharedTransitionScope.CompactRecordCard( modifier = Modifier .fillMaxWidth() .aspectRatio(1f) + .clip(RoundedCornerShape(8.dp)) .sharedElement( sharedContentState = rememberSharedContentState(key = "photo_${record.id}"), animatedVisibilityScope = animatedVisibilityScope