Skip to content

Commit

Permalink
feat: [ANDROAPP-5728] mobile-ui-Change-show-more-color-and-correct-al…
Browse files Browse the repository at this point in the history
…ignment-in-ListCard-component (#143)

* [ANDROAPP-5728] change show more/less item colour and fix alignment

* [ANDROAPP-5728] Correct vertical alignment for show more component
  • Loading branch information
xavimolloy authored Nov 15, 2023
1 parent 26f3501 commit 2e2d4ed
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
Expand Down Expand Up @@ -40,6 +41,7 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import org.hisp.dhis.mobile.ui.designsystem.component.internal.conditional
import org.hisp.dhis.mobile.ui.designsystem.resource.provideDHIS2Icon
import org.hisp.dhis.mobile.ui.designsystem.resource.provideStringResource
Expand Down Expand Up @@ -335,8 +337,7 @@ private fun AdditionalInfoColumn(
} else {
Icons.Filled.KeyboardArrowUp
}
val verticalPadding = if (isDetailCard) Spacing.Spacing10 else Spacing.Spacing0
val expandTextColor = if (isDetailCard) TextColor.OnSurfaceLight else SurfaceColor.Primary
val expandTextColor = TextColor.OnSurfaceLight
Row(
Modifier
.clip(RoundedCornerShape(Radius.M))
Expand All @@ -351,7 +352,9 @@ private fun AdditionalInfoColumn(
color = SurfaceColor.Primary,
),
)
.padding(top = verticalPadding, end = Spacing.Spacing2, bottom = verticalPadding),
.padding(end = Spacing.Spacing2)
.offset(x = (-3).dp),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
imageVector = iconVector,
Expand All @@ -363,6 +366,7 @@ private fun AdditionalInfoColumn(
color = expandTextColor,
style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.padding(horizontal = Spacing4),

)
}
}
Expand Down

0 comments on commit 2e2d4ed

Please sign in to comment.