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
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,
)
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