Update the readme
This commit is contained in:
parent
2056348ec0
commit
8fdc6f12ab
2 changed files with 13 additions and 34 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package com.pixelized.desktop.lwa.ui.screen.gamemaster.items
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -103,6 +104,7 @@ fun GMCharacter(
|
|||
Box(
|
||||
modifier = Modifier
|
||||
.clip(shape = remember { RoundedCornerShape(8.dp) })
|
||||
.clickable(onClick = onEdit)
|
||||
.background(color = MaterialTheme.lwa.colorScheme.elevated.base1dp)
|
||||
.then(other = modifier),
|
||||
) {
|
||||
|
|
@ -129,9 +131,8 @@ fun GMCharacter(
|
|||
),
|
||||
)
|
||||
}
|
||||
MenuActions(
|
||||
OverflowActionMenu(
|
||||
character = character,
|
||||
onEdit = onEdit,
|
||||
onAction = onAction,
|
||||
)
|
||||
}
|
||||
|
|
@ -153,32 +154,6 @@ fun GMCharacter(
|
|||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun MenuActions(
|
||||
modifier: Modifier = Modifier,
|
||||
character: GMCharacterUio,
|
||||
onEdit: () -> Unit,
|
||||
onAction: (Action) -> Unit,
|
||||
) {
|
||||
Row(
|
||||
modifier = modifier,
|
||||
) {
|
||||
IconButton(
|
||||
onClick = onEdit
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Edit,
|
||||
tint = MaterialTheme.lwa.colorScheme.base.primary,
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
OverflowActionMenu(
|
||||
character = character,
|
||||
onAction = onAction,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun OverflowActionMenu(
|
||||
modifier: Modifier = Modifier,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue