Merge "[CredManUi] Updated paddings within an entry." into udc-dev
This commit is contained in:
@@ -74,6 +74,12 @@ fun Entry(
|
|||||||
/** If true, draws a trailing lock icon. */
|
/** If true, draws a trailing lock icon. */
|
||||||
isLockedAuthEntry: Boolean = false,
|
isLockedAuthEntry: Boolean = false,
|
||||||
) {
|
) {
|
||||||
|
val iconPadding = Modifier.wrapContentSize().padding(
|
||||||
|
// Horizontal padding should be 16dp, but the suggestion chip itself
|
||||||
|
// has 8dp horizontal elements padding
|
||||||
|
start = 8.dp, top = 16.dp, bottom = 16.dp
|
||||||
|
)
|
||||||
|
val iconSize = Modifier.size(24.dp)
|
||||||
SuggestionChip(
|
SuggestionChip(
|
||||||
modifier = modifier.fillMaxWidth().wrapContentHeight(),
|
modifier = modifier.fillMaxWidth().wrapContentHeight(),
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
@@ -81,7 +87,11 @@ fun Entry(
|
|||||||
label = {
|
label = {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
modifier = Modifier.fillMaxWidth().padding(all = 16.dp),
|
modifier = Modifier.fillMaxWidth().padding(
|
||||||
|
// Total end padding should be 16dp, but the suggestion chip itself
|
||||||
|
// has 8dp horizontal elements padding
|
||||||
|
horizontal = 8.dp, vertical = 16.dp,
|
||||||
|
),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.wrapContentSize()) {
|
Column(modifier = Modifier.wrapContentSize()) {
|
||||||
@@ -121,7 +131,7 @@ fun Entry(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isLockedAuthEntry) {
|
if (isLockedAuthEntry) {
|
||||||
Box(modifier = Modifier.wrapContentSize().padding(end = 16.dp)) {
|
Box(modifier = Modifier.wrapContentSize()) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Outlined.Lock,
|
imageVector = Icons.Outlined.Lock,
|
||||||
// Decorative purpose only.
|
// Decorative purpose only.
|
||||||
@@ -137,10 +147,9 @@ fun Entry(
|
|||||||
if (iconImageBitmap != null) {
|
if (iconImageBitmap != null) {
|
||||||
if (shouldApplyIconImageBitmapTint) {
|
if (shouldApplyIconImageBitmapTint) {
|
||||||
{
|
{
|
||||||
Box(modifier = Modifier.wrapContentSize()
|
Box(modifier = iconPadding) {
|
||||||
.padding(start = 16.dp, top = 16.dp, bottom = 16.dp)) {
|
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = iconSize,
|
||||||
bitmap = iconImageBitmap,
|
bitmap = iconImageBitmap,
|
||||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
// Decorative purpose only.
|
// Decorative purpose only.
|
||||||
@@ -150,10 +159,9 @@ fun Entry(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
Box(modifier = Modifier.wrapContentSize()
|
Box(modifier = iconPadding) {
|
||||||
.padding(start = 16.dp, top = 16.dp, bottom = 16.dp)) {
|
|
||||||
Image(
|
Image(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = iconSize,
|
||||||
bitmap = iconImageBitmap,
|
bitmap = iconImageBitmap,
|
||||||
// Decorative purpose only.
|
// Decorative purpose only.
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
@@ -163,10 +171,9 @@ fun Entry(
|
|||||||
}
|
}
|
||||||
} else if (iconImageVector != null) {
|
} else if (iconImageVector != null) {
|
||||||
{
|
{
|
||||||
Box(modifier = Modifier.wrapContentSize()
|
Box(modifier = iconPadding) {
|
||||||
.padding(start = 16.dp, top = 16.dp, bottom = 16.dp)) {
|
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = iconSize,
|
||||||
imageVector = iconImageVector,
|
imageVector = iconImageVector,
|
||||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
// Decorative purpose only.
|
// Decorative purpose only.
|
||||||
@@ -176,10 +183,9 @@ fun Entry(
|
|||||||
}
|
}
|
||||||
} else if (iconPainter != null) {
|
} else if (iconPainter != null) {
|
||||||
{
|
{
|
||||||
Box(modifier = Modifier.wrapContentSize()
|
Box(modifier = iconPadding) {
|
||||||
.padding(start = 16.dp, top = 16.dp, bottom = 16.dp)) {
|
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = iconSize,
|
||||||
painter = iconPainter,
|
painter = iconPainter,
|
||||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
// Decorative purpose only.
|
// Decorative purpose only.
|
||||||
|
|||||||
Reference in New Issue
Block a user