From 1d18b43bc298476514739a97a6f90136590ee9fa Mon Sep 17 00:00:00 2001 From: The412Banner Date: Fri, 9 Oct 2026 08:48:32 -0400 Subject: [PATCH] Stores: the chip row has no box of its own The sticky chip row painted the theme's flat background colour, a near black box against the front end's tinted background. It paints nothing now; the content scrolling beneath is clipped at the row's edge and, once scrolled, faded out there through its own alpha rather than a colour laid over it. --- .../com/droiddeck/launcher/ui/StoresPage.kt | 25 +++++++++++++------ docs/progress-log.md | 3 +++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt index defad024a..76b1b71c0 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt @@ -1,5 +1,6 @@ package com.droiddeck.launcher.ui +import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.draw.drawBehind import androidx.compose.ui.graphics.Brush import androidx.compose.ui.draw.clipToBounds @@ -155,12 +156,24 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier onNext = { if (openGame == null && chip != DOWNLOADS) { val t = tabsFor(store); switchTab(t[(t.indexOf(shownTab) + 1) % t.size]) } }, ), ) { - // The chip row stays put on the page's own ground; what scrolls passes under it, clipped, - // with a short fade where it meets the row. - Box(Modifier.fillMaxWidth().background(MaterialTheme.colorScheme.background).padding(bottom = 8.dp)) { + // The chip row stays put and paints nothing - the page's background shows through it. What + // scrolls is clipped at the row's lower edge and, once scrolled, faded out there: the + // content's own alpha, not a colour laid over it. + Box(Modifier.fillMaxWidth().padding(bottom = 8.dp)) { Rise(0) { StoreChips(chip, s.storeDownloadsActive, onPick = pickChip, onSettings = { settings = true }) } } - Box(Modifier.fillMaxWidth().weight(1f, fill = false).clipToBounds()) { + val fade = with(androidx.compose.ui.platform.LocalDensity.current) { 14.dp.toPx() } + Box( + Modifier.fillMaxWidth().weight(1f, fill = false).clipToBounds() + .graphicsLayer { compositingStrategy = androidx.compose.ui.graphics.CompositingStrategy.Offscreen } + .drawWithContent { + drawContent() + if (scroll.value > 0 && size.height > fade) drawRect( + Brush.verticalGradient(0f to Color.Transparent, fade / size.height to Color.Black), + blendMode = androidx.compose.ui.graphics.BlendMode.DstIn, + ) + }, + ) { Column(modifier = Modifier.fillMaxWidth().verticalScroll(scroll).padding(top = 4.dp, bottom = 16.dp)) { when { chip == DOWNLOADS -> StoresDownloadsPane(s, a) @@ -173,10 +186,6 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier else -> Storefront(store, shownTab, query, s, a, onTab = { switchTab(it) }, onQuery = { query = it }, onOpen = { open(it) }) } } - if (scroll.value > 0) Spacer( - Modifier.align(Alignment.TopCenter).fillMaxWidth().height(14.dp) - .background(Brush.verticalGradient(0f to MaterialTheme.colorScheme.background, 1f to Color.Transparent)), - ) } } if (settings) StoresSettingsDialog(s, a) { settings = false } diff --git a/docs/progress-log.md b/docs/progress-log.md index cce00df4e..db80698ce 100644 --- a/docs/progress-log.md +++ b/docs/progress-log.md @@ -153,6 +153,9 @@ without it and Setup says "Stores engine not built"). - **Cloud saves device-proven (AYANEO Pocket FIT, `6a175f1`, ELDERBORN on GOG):** the launch logged `cloud gog 1732383191 down result=ok files=5 bytes=237499 reason=downloaded` (template found) and the in-game slot shows the cloud save (Catacombs: Tutorial part 1, 00:08:40). +- **The Stores chip row paints nothing** (maintainer: a black box behind the chips): it sits over the + page's own background; the content scrolling under it is clipped at its edge and faded there by + the content's alpha once scrolled, never by a colour. - **Pre-PR device checks pass (AYANEO Pocket FIT):** GOG install, launch and cloud saves down and up (the session-end upload included); Epic with EOS sign-in; Amazon (Dread Templar); an SD-card install (DOOM I Enhanced) launched from `/mnt/droiddeck-sd`.