diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt index 6dab804a3..73be345a3 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt @@ -80,6 +80,17 @@ import kotlinx.collections.immutable.ImmutableList import kotlinx.coroutines.flow.collectLatest private val featuredImageBackgroundAspectRatio: Float + @Composable + @ReadOnlyComposable + get() = + when (LocalWindowSizeClass.current.widthSizeClass) { + WindowWidthSizeClass.Compact -> 0.8f + WindowWidthSizeClass.Medium -> 1.11f + WindowWidthSizeClass.Expanded -> 2.3f + else -> 0.8f + } + +private val featuredGradientBackgroundAspectRatio: Float @Composable @ReadOnlyComposable get() = @@ -278,7 +289,7 @@ private fun FeaturedSectionBlurredBackground(modifier: Modifier = Modifier, imag } else { Box( modifier = - Modifier.aspectRatio(0.8f).composed { + Modifier.aspectRatio(featuredGradientBackgroundAspectRatio).composed { val colorStops = listOf( AppTheme.colorScheme.tintedHighlight.copy(alpha = 0.0f),