From 0f7a0eae26cb54793e2de164250c59ca5738e9c9 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 4 May 2026 13:29:14 -0400 Subject: [PATCH 1/3] feat(bill-customization): generate gradient from random hue with fixed saturation/value stops Replace independent random swatch selection with a single random base hue, deriving top/mid/bottom gradient colors via HSV adjustments for a more cohesive bill gradient. Signed-off-by: Brandon McAnsh --- .../internal/defaults/ColorDefaults.kt | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/apps/flipcash/shared/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/internal/defaults/ColorDefaults.kt b/apps/flipcash/shared/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/internal/defaults/ColorDefaults.kt index d46d15f82..af607e065 100644 --- a/apps/flipcash/shared/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/internal/defaults/ColorDefaults.kt +++ b/apps/flipcash/shared/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/internal/defaults/ColorDefaults.kt @@ -1,7 +1,12 @@ package com.flipcash.app.bill.customization.internal.defaults +import androidx.compose.ui.graphics.Color +import androidx.core.graphics.toColorInt import com.flipcash.app.bill.customization.models.ColorStore import com.getcode.opencode.model.ui.BillBackground +import com.getcode.ui.utils.Hsv +import com.getcode.ui.utils.color +import com.getcode.ui.utils.hsv internal const val MaxGradientColors = 3 @@ -34,10 +39,18 @@ internal val PresetGradients: List = listOf( internal fun buildGradient(): List { val swatches = PresetColorOptions - // return a random 3 color gradient + // select a random base + val base = Color(swatches.random().colorHex.toColorInt()) + + // mutate per recipe + val top = base.hsv.copy(s = 0.53f, v = 1f,) + val mid = base.hsv.copy(s = 1f, v = 0.71f,) + val bottom = base.hsv.copy(s = 1f, v = 0.23f,) + + // return the random hue gradient return listOf( - ColorStore(swatches.random().colorHex), - ColorStore(swatches.random().colorHex), - ColorStore(swatches.random().colorHex), + ColorStore(top.color), + ColorStore(mid.color), + ColorStore(bottom.color), ) } \ No newline at end of file From 2209d4bc9f6e0da93e571dde5c54b519d5affea0 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 4 May 2026 13:34:32 -0400 Subject: [PATCH 2/3] chore: rename Bill Creeator -> Bill Designer Signed-off-by: Brandon McAnsh --- apps/flipcash/core/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/flipcash/core/src/main/res/values/strings.xml b/apps/flipcash/core/src/main/res/values/strings.xml index c058d72ba..69ca589ad 100644 --- a/apps/flipcash/core/src/main/res/values/strings.xml +++ b/apps/flipcash/core/src/main/res/values/strings.xml @@ -373,7 +373,7 @@ No Activity Your recent activity will appear here when you send or receive money - Bill Creator + Bill Designer Create Your Currency Launch your own currency in minutes.\nReady to use right away. Name From 2f43012c4e1f2db38adf814605767d4c3f98c17e Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 4 May 2026 13:35:29 -0400 Subject: [PATCH 3/3] chore(bill-customization): hide back button Signed-off-by: Brandon McAnsh --- .../app/bill/customization/BillCustomizationScaffold.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/flipcash/features/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/BillCustomizationScaffold.kt b/apps/flipcash/features/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/BillCustomizationScaffold.kt index 5264541eb..26fe9c18e 100644 --- a/apps/flipcash/features/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/BillCustomizationScaffold.kt +++ b/apps/flipcash/features/bill-customization/src/main/kotlin/com/flipcash/app/bill/customization/BillCustomizationScaffold.kt @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -134,7 +135,6 @@ fun BillPlaygroundScaffold(content: @Composable () -> Unit) { canCopy = controller.canCopy, onUndo = { controller.dispatchEvent(Event.Undo) }, onCopy = { controller.dispatchEvent(Event.Copy) }, - onBack = { controller.cancel() }, onDone = { controller.cancel() }, ) } @@ -165,7 +165,6 @@ fun BillPlaygroundScaffold(content: @Composable () -> Unit) { @Composable private fun TopBar( modifier: Modifier = Modifier, - onBack: () -> Unit, canUndo: Boolean, canCopy: Boolean, onUndo: () -> Unit, @@ -180,12 +179,12 @@ private fun TopBar( horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { - AppBarDefaults.UpNavigation { onBack() } - Row( horizontalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2), verticalAlignment = Alignment.CenterVertically ) { + Spacer(Modifier.weight(1f)) + val undoAlpha by animateFloatAsState( targetValue = if (canUndo) 1f else ContentAlpha.disabled, )