Add scrim behind season tabs for readability (#657)

## Description

Adds a dark gradient scrim behind the season tabs on the TV Show Details
screen to improve text readability against bright backdrop images. This
follows the same pattern used in PlaybackOverlay.kt for the playback
controls.

  The scrim uses two combined gradients:
  - Vertical: Dark at top (0.80α → 0.5α) fading to transparent at bottom
- Horizontal: Fades in from transparent (left) to full opacity (right),
starting at 15% screen width to avoid overlapping with the nav rail

The gradients are composited using BlendMode.DstIn to create a smooth 2D
fade effect.

### Related issues
Fixes #547

### Screenshots

<img width="1920" height="1084" alt="season_darkened_background"
src="https://github.com/user-attachments/assets/a85237e4-2812-433c-902b-36f9860448c5"
/>

### AI/LLM usage
AI used to draft PR description and documentation
This commit is contained in:
Justin Caveda 2026-01-11 16:07:40 -06:00 committed by GitHub
parent 2377a15611
commit 19833a1a03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,10 @@ import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
// Top scrim configuration for text readability (clock, season tabs)
private const val TOP_SCRIM_ALPHA = 0.55f
private const val TOP_SCRIM_END_FRACTION = 0.25f // Fraction of backdrop image height
@HiltViewModel
class ApplicationContentViewModel
@Inject
@ -73,6 +77,7 @@ fun ApplicationContent(
navigationManager: NavigationManager,
preferences: UserPreferences,
modifier: Modifier = Modifier,
enableTopScrim: Boolean = true,
viewModel: ApplicationContentViewModel = hiltViewModel(),
) {
val backStack: MutableList<NavKey> =
@ -179,6 +184,20 @@ fun ApplicationContent(
.alpha(.95f)
.drawWithContent {
drawContent()
// Subtle top scrim for system UI readability (clock, tabs)
if (enableTopScrim) {
drawRect(
brush =
Brush.verticalGradient(
colorStops =
arrayOf(
0f to Color.Black.copy(alpha = TOP_SCRIM_ALPHA),
TOP_SCRIM_END_FRACTION to Color.Transparent,
),
),
blendMode = BlendMode.Multiply,
)
}
drawRect(
brush =
Brush.horizontalGradient(