diff --git a/src/main/kotlin/com/bolenpad/photophetch/ui/ImportScreen.kt b/src/main/kotlin/com/bolenpad/photophetch/ui/ImportScreen.kt index 4e664d9..d666f40 100644 --- a/src/main/kotlin/com/bolenpad/photophetch/ui/ImportScreen.kt +++ b/src/main/kotlin/com/bolenpad/photophetch/ui/ImportScreen.kt @@ -48,24 +48,32 @@ fun ImportScreen(state: AppState) { // ── Scrollable body with bottom shadow indicator ───────────────────── val scrollState = rememberScrollState() - val showShadow by remember { derivedStateOf { scrollState.value < scrollState.maxValue } } + // shadowAlpha: 1.0 when far from bottom, fades to 0.0 over the last 80px + val shadowAlpha by remember { + derivedStateOf { + val remaining = scrollState.maxValue - scrollState.value + (remaining / 80f).coerceIn(0f, 1f) + } + } Box( modifier = Modifier .weight(1f) - .then( - if (showShadow) Modifier.drawWithContent { - drawContent() - // Thin shadow strip along the bottom edge + .drawWithContent { + drawContent() + if (shadowAlpha > 0f) { drawRect( brush = Brush.verticalGradient( - colors = listOf(Color.Transparent, Color.Black.copy(alpha = 0.10f)), + colors = listOf( + Color.Transparent, + Color.Black.copy(alpha = 0.10f * shadowAlpha), + ), startY = size.height - 24.dp.toPx(), endY = size.height, ) ) - } else Modifier - ) + } + } ) { Column( modifier = Modifier