Skip to content

Commit

Permalink
Merge pull request #12351 from woocommerce/12346-woo-pos-products-bac…
Browse files Browse the repository at this point in the history
…kground-has-incorrect-color-screen-has-rounded-corners-instead-of-being-flat

[Woo POS] Products background has incorrect color screen. The totals has rounded corners instead of being flat
  • Loading branch information
kidinov authored Aug 19, 2024
2 parents 8384322 + a6a69b9 commit 384f27e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -138,40 +137,26 @@ private fun WooPosHomeScreen(
Box(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colors.surface)
.background(MaterialTheme.colors.background)
) {
Row(
modifier = Modifier
.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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -114,10 +113,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,
Expand Down Expand Up @@ -200,15 +195,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
Expand Down

0 comments on commit 384f27e

Please sign in to comment.