From 6e990cf93f938f39a98af862abbe5d1e84cd2b95 Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Aug 2024 10:48:51 +0200 Subject: [PATCH 1/5] Fixed home background color --- .../com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt index 08851520cc6..20cabcbe162 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt @@ -138,7 +138,7 @@ private fun WooPosHomeScreen( Box( modifier = Modifier .fillMaxSize() - .background(MaterialTheme.colors.surface) + .background(MaterialTheme.colors.background) ) { Row( modifier = Modifier From dd480c4d0e69829ea93236eb9951b818418967aa Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Aug 2024 10:59:25 +0200 Subject: [PATCH 2/5] Surface color on the dark mode slightly latter to make it look closer to the proposed design --- .../android/ui/woopos/common/composeui/WooPosTheme.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/common/composeui/WooPosTheme.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/common/composeui/WooPosTheme.kt index 4dad524cca5..e38b83bdf01 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/common/composeui/WooPosTheme.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/common/composeui/WooPosTheme.kt @@ -28,7 +28,7 @@ private val DarkColorPalette = darkColors( onPrimary = Color.White, secondary = Color(0xFF0A9400), secondaryVariant = Color(0xFF8D8D8D), - surface = Color(0xFF121212), + surface = Color(0xFF2E2E2E), onSurface = Color.White, background = Color(0xFF121212), onBackground = Color.White, From 84543e58b50d74580479d9beb51ce6ab86a1c139 Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Aug 2024 11:03:17 +0200 Subject: [PATCH 3/5] Removed redundant wrapper layouts --- .../ui/woopos/home/WooPosHomeScreen.kt | 37 ++++++------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt index 20cabcbe162..c0183d072c3 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt @@ -11,7 +11,6 @@ import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.interaction.MutableInteractionSource -import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize @@ -145,33 +144,19 @@ private fun WooPosHomeScreen( .horizontalScroll(scrollState, enabled = false) .fillMaxWidth(), ) { - Row(modifier = Modifier.width(productsWidthDp)) { - WooPosHomeScreenProducts( - modifier = Modifier - .width(productsWidthDp) - ) - } - Row( + WooPosHomeScreenProducts( + modifier = Modifier + .width(productsWidthDp) + ) + WooPosHomeScreenCart( modifier = Modifier - .width(cartWidthDp) .background(MaterialTheme.colors.surface) - ) { - Box { - WooPosHomeScreenCart( - modifier = Modifier - .width(cartWidthDp) - ) - } - } - Row( - modifier = Modifier.width(totalsWidthDp), - horizontalArrangement = Arrangement.Center - ) { - WooPosHomeScreenTotals( - modifier = Modifier - .width(totalsWidthDp) - ) - } + .width(cartWidthDp) + ) + WooPosHomeScreenTotals( + modifier = Modifier + .width(totalsWidthDp) + ) } WooPosHomeScreenToolbar( From e16ead9ed5608f3ba2a05db30209cbd31bf4044b Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Aug 2024 11:05:09 +0200 Subject: [PATCH 4/5] Simplified TotalsLoading layout --- .../ui/woopos/home/totals/WooPosTotalsScreen.kt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt index 659052b67f0..2b831500cfc 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt @@ -202,15 +202,9 @@ private fun TotalsGridRow( @Composable private fun TotalsLoading() { - Column( - modifier = Modifier - .background( - color = MaterialTheme.colors.background, - shape = RoundedCornerShape(16.dp), - ) - .fillMaxSize(), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.Center, + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center, ) { Column( modifier = Modifier From ac025b6c8504b4ee4ad65e0dc3774c2f7eac1ca5 Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 16 Aug 2024 11:14:02 +0200 Subject: [PATCH 5/5] Slightly simplified TotalsLoaded layout --- .../android/ui/woopos/home/totals/WooPosTotalsScreen.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt index 2b831500cfc..a8e77d7f76d 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt @@ -4,7 +4,6 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibilityScope import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -116,10 +115,6 @@ private fun TotalsLoaded( modifier = Modifier .weight(1f) .fillMaxWidth() - .background( - color = MaterialTheme.colors.background, - shape = RoundedCornerShape(16.dp), - ) .verticalScroll(rememberScrollState()), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center,