Skip to content

Watch-progress bar on cards has no track: invisible over light artwork, and its length can't be read #1989

Open

Description

@SergeiAK

Description

The played-percent bar along the bottom of a card is a bare fill painted straight onto the poster — no track behind it, no inset from the card edges. Both places that draw it repeat the same geometry:

// ItemCardImage.kt (ItemCardImageOverlay), and the same block in BannerCard.kt
Box(
    modifier =
        Modifier
            .align(Alignment.BottomStart)
            .background(MaterialTheme.colorScheme.tertiary)
            .clip(RectangleShape)
            .height(Cards.playedPercentHeight)
            .fillMaxWidth((watchedPercent / 100.0).toFloat()),
)

Two separate problems come out of that, and neither is theme-specific.

1. Over light artwork it all but disappears. The fill is colorScheme.tertiary, and in the dark palettes tertiary is a pale colour by design — #DEDEDE in OLED Black, #FCE574 in Orange, #DFC38C in Red, #C8CA94 in Brown, #81D29C in Green. Put #DEDEDE against the bottom of a light poster — a beige coat, a yellow background, white box art — and there is almost nothing left to see; against white box art, nothing at all.

2. Even where it is visible, its length carries no information. There is nothing marking where 100% would be, so a 15% fill and a 55% fill both read as "a stub in the bottom-left corner". Progress is a proportion, and a proportion needs the empty remainder to be visible to be read at a glance. Every other client I have in front of me (Jellyfin web, Plex, the Android TV system rows) draws the remainder as a dim track for that reason.

Minor, in the same block: .background(...).clip(RectangleShape) — the clip comes after the background, so it does nothing.

The fix I have

A single PlayedPercentBar composable used by both cards instead of the duplicated geometry: the fill sits in a black track inset 6 dp from the card edges, rounded, with a 1 dp black border that the track provides for free. The track gives the bar both a background it can never disappear into and a visible 100%, in every preset — no per-theme branches, no new colours.

3 files, +57/−18. Builds on current main, ktlint clean, tested on an NVIDIA Shield TV Pro 2019 (Android 11) and a Dune HD Homatics Box R 4K Plus (Android 14) against Jellyfin 10.11.11.

Diff
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/cards/BannerCard.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/cards/BannerCard.kt
index 4536a364..e055e8b0 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/cards/BannerCard.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/cards/BannerCard.kt
@@ -183,15 +183,9 @@ fun BannerCard(
                 )
             }
             if (playPercent > 0 && playPercent < 100) {
-                Box(
-                    modifier =
-                        Modifier
-                            .align(Alignment.BottomStart)
-                            .background(
-                                MaterialTheme.colorScheme.tertiary,
-                            ).clip(RectangleShape)
-                            .height(Cards.playedPercentHeight)
-                            .fillMaxWidth((playPercent / 100).toFloat()),
+                PlayedPercentBar(
+                    percent = playPercent,
+                    modifier = Modifier.align(Alignment.BottomStart),
                 )
             }
         }
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/cards/ItemCardImage.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/cards/ItemCardImage.kt
index aaa3de97..c7e584b1 100644
--- a/app/src/main/java/com/github/damontecres/wholphin/ui/cards/ItemCardImage.kt
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/cards/ItemCardImage.kt
@@ -266,15 +266,9 @@ fun ItemCardImageOverlay(
         }
 
         if (watchedPercent != null && watchedPercent > 0 && watchedPercent < 100) {
-            Box(
-                modifier =
-                    Modifier
-                        .align(Alignment.BottomStart)
-                        .background(
-                            MaterialTheme.colorScheme.tertiary,
-                        ).clip(RectangleShape)
-                        .height(Cards.playedPercentHeight)
-                        .fillMaxWidth((watchedPercent / 100.0).toFloat()),
+            PlayedPercentBar(
+                percent = watchedPercent,
+                modifier = Modifier.align(Alignment.BottomStart),
             )
         }
     }
diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/cards/PlayedPercentBar.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/cards/PlayedPercentBar.kt
new file mode 100644
index 00000000..c951e9e0
--- /dev/null
+++ b/app/src/main/java/com/github/damontecres/wholphin/ui/cards/PlayedPercentBar.kt
@@ -0,0 +1,51 @@
+package com.github.damontecres.wholphin.ui.cards
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.dp
+import androidx.tv.material3.MaterialTheme
+import com.github.damontecres.wholphin.ui.Cards
+
+/**
+ * The watch progress along the bottom of a card.
+ *
+ * The fill sits inside a black track that is inset from the card edges, so the bar stays
+ * readable over artwork of any colour: a bare fill drawn straight onto the poster
+ * disappears wherever the image happens to be the same colour.
+ */
+@Composable
+fun PlayedPercentBar(
+    percent: Double,
+    modifier: Modifier = Modifier,
+) {
+    val fraction = (percent / 100.0).toFloat().coerceIn(0f, 1f)
+    val shape = RoundedCornerShape(Cards.playedPercentHeight / 2)
+    Box(
+        modifier =
+            modifier
+                .fillMaxWidth()
+                .padding(horizontal = 6.dp, vertical = 6.dp)
+                .height(Cards.playedPercentHeight)
+                .clip(shape)
+                .background(Color.Black)
+                .padding(1.dp),
+    ) {
+        Box(
+            modifier =
+                Modifier
+                    .fillMaxHeight()
+                    .fillMaxWidth(fraction)
+                    .clip(shape)
+                    .background(MaterialTheme.colorScheme.tertiary),
+        )
+    }
+}

Happy to open a PR if you want it in this shape. If you would rather the track were a dimmed tertiary or TransparentBlack50 instead of solid black, or the inset different, say which and I will change it before the PR — the geometry is all in one place now.

I mentioned this one in #91 while proposing a theme and said I would file it on its own, because it changes how all eight presets look and had no business sitting inside a theme proposal.

Reproduction steps

  1. Any theme — the screenshots are the Black preset, where tertiary is #DEDEDE.
  2. Start a movie whose poster is light at the bottom edge and stop somewhere in the middle.
  3. Go to the home screen and look at the Continue Watching row.
  4. The bar is either invisible, or visible but indistinguishable in length from any other partly-watched card.

Screenshots below: same device, same server, same library, same Black preset, same row, taken minutes apart — the only difference is the build.

1. Before — Continue Watching row on the upstream build. The bars are #DEDEDE, flush with the card edge, and each one is just a stub: nothing says where the film would end.

Before — Continue Watching row

2. After — the same row with the fix.

After — Continue Watching row

3. Before, one card blown up — "Beware of the Car": the pale bar runs into the beige coat, and its length tells you nothing.

Before — one card blown up

4. After, the same card — the black track separates the bar from the artwork and shows how much of the film is left (about a quarter watched).

After — one card blown up

Experimental settings

No

App Version

v1.0.8 (1.0.8-4-gffdebd43)

Server Version

10.11.11

Device

NVIDIA Shield TV Pro 2019 (Android 11); also reproduced on a Dune HD Homatics Box R 4K Plus (Android 14)

Activity

  1. damontecres commented on Sep 28, 2026

    @damontecres
    Owner

    I'm interested in this. I have to check out your changes and how this look with the other themes too.

    I never particularly liked that the watch progress on cards is different from the border color, but I did because otherwise the progress and focus border would blend together.

    Also, as you're working on UI and/or theme color changes like this, be sure to check out ThemePreview.kt which will preview virtually every UI element in the app across every theme.

  2. SergeiAK commented on Sep 28, 2026

    @SergeiAK
    ContributorAuthor

    multiple screenshots with other themes

    Image Image Image Image
  3. SergeiAK commented on Sep 29, 2026

    @SergeiAK
    ContributorAuthor

    Thanks for the pointer to ThemePreview — I ran the branch through it, and it answers your
    point about the bar and the focus border.

    With the track, the bar no longer touches the border. It is inset 6 dp inside a black
    track, so there is always a band of black between the fill and the focus ring. That removes
    the reason the fill had to be a different colour from the border — which is what made it
    look off-theme: in Orange the fill is yellow, in Red gold, in Brown olive, while the watched
    badge on the very same card is orange, red, brown.

    So I tried one more step: colour the fill like the watched badge (WatchedIconBackground(),
    i.e. the border colour). The focused card from ThemePreview in every theme, the fix from
    the issue on the left of each pair, this step on the right:

    Image

    Purple, Blue, Green, Orange and Red: fill, badge and focus ring are now one colour, and the
    ring and the fill stay clearly apart. Bold Blue and OLED Black are unchanged (see below);
    Signal is my fork's theme and uses green for watched on purpose.

    Two themes can't use the badge colour as is — it's too dark to read on a black track:

    Theme badge / border contrast vs black used for the fill instead
    Bold Blue #152986 1.7 : 1 tertiary #BEC9FF (as today)
    Brown #6D3B07 2.3 : 1 primary #FFB784 (the slider colour)
    OLED Black secondaryContainer (dark grey) — tertiary #DEDEDE (as today)

    For reference, the badge colour elsewhere: Purple 3.3, Blue 3.3, Red 3.2, Green 5.3,
    Orange 8.3 : 1 against black.

    Diff on top of the one in the issue
    // PlayedPercentBar.kt: .background(MaterialTheme.colorScheme.tertiary) -> .background(PlayedPercentColor())
    
    @Composable
    fun PlayedPercentColor(): Color =
        when (LocalTheme.current) {
            AppThemeColors.UNRECOGNIZED,
            AppThemeColors.PURPLE,
            AppThemeColors.BLUE,
            AppThemeColors.GREEN,
            AppThemeColors.ORANGE,
            AppThemeColors.RED,
            AppThemeColors.SIGNAL,
            -> WatchedIconBackground()
    
            // The badge colour is dark brown here, almost invisible on black
            AppThemeColors.BROWN -> MaterialTheme.colorScheme.primary
    
            // The badge colour is dark navy / dark grey here; tertiary already matches the theme
            AppThemeColors.BOLD_BLUE,
            AppThemeColors.OLED_BLACK,
            -> MaterialTheme.colorScheme.tertiary
        }

    (SIGNAL is only in my fork; for upstream the same function without that line.)

    Which would you rather have in the PR: the track alone with tertiary as in the issue, or the
    track plus the badge colour as above?

  4. xtrandom commented on Oct 12, 2026

    @xtrandom

    @damontecres whenever you have time, would be nice to get this merged / sorted :)

  5. damontecres commented on Oct 16, 2026

    @damontecres
    Owner

    @SergeiAK Did you open a PR for this? Can you link it?

    I thought I saw a one somewhere, but I can't find it.

  6. SergeiAK commented on Oct 16, 2026

    @SergeiAK
    ContributorAuthor

    Not until now, sorry — I was waiting for your pick between the two variants. Here it is: #2089. It has the track plus the badge colour as two separate commits; if you'd rather have the track alone with tertiary, just drop the second one (or tell me and I'll do it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions