Skip to content

Commit

Permalink
ui: fix dark mode color
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Oct 23, 2024
1 parent 13367ac commit aab3f16
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,29 +107,24 @@ class ToolbarConfigActivity : ComponentActivity() {
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun ToolbarConfigPanel(list: MutableState<List<ToolbarActionInfo>>) {
val lazyGridState = rememberLazyGridState()
val reorderableLazyGridState = rememberReorderableLazyGridState(lazyGridState) { from, to ->
list.value = list.value.toMutableList().apply {
val item = removeAt(from.index)
add(to.index, item)
}
}

Column(
modifier = Modifier.padding(vertical = 8.dp, horizontal = 1.dp),
) {
Text(
modifier = Modifier.padding(10.dp),
text = "Preview",
color = MaterialTheme.colors.onBackground,
style = MaterialTheme.typography.h6
)
Text(
modifier = Modifier.padding(start = 10.dp, bottom = 10.dp),
text = "tap to remove; drag to reorder",
color = MaterialTheme.colors.onBackground,
style = MaterialTheme.typography.caption
)
Box(
modifier = Modifier.fillMaxWidth()
modifier = Modifier
.fillMaxWidth()
.border(1.dp, MaterialTheme.colors.onBackground),
contentAlignment = Alignment.CenterEnd
) {
Expand All @@ -149,13 +144,15 @@ fun ToolbarConfigPanel(list: MutableState<List<ToolbarActionInfo>>) {
)
}
Text(
modifier = Modifier.padding(start = 10.dp, top = 10.dp, bottom = 5.dp),
modifier = Modifier.padding(start = 10.dp, top = 20.dp, bottom = 5.dp),
text = "Other Actions",
color = MaterialTheme.colors.onBackground,
style = MaterialTheme.typography.h6
)
Text(
modifier = Modifier.padding(start = 10.dp, bottom = 10.dp),
text = "tap to add",
color = MaterialTheme.colors.onBackground,
style = MaterialTheme.typography.caption
)
LazyVerticalGrid(
Expand Down

0 comments on commit aab3f16

Please sign in to comment.