Skip to content

Commit

Permalink
Fixed icon content description
Browse files Browse the repository at this point in the history
  • Loading branch information
sirekanian committed Dec 31, 2023
1 parent 992d4e5 commit b24d296
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/org/sirekanyan/outline/MainContent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ fun MainContent(state: MainState) {
MainTopAppBar(
title = { SearchField(search.query) { search.query = it } },
onMenuClick = search::closeSearch,
menuIcon = Icons.Default.ArrowBack,
menuIcon = { Icon(Icons.Default.ArrowBack, "back") },
)
} else {
val menuItems: List<MenuItem> =
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/sirekanyan/outline/MainTopAppBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ data class MenuItem(val text: String, val icon: ImageVector, val onClick: () ->
fun MainTopAppBar(
title: @Composable () -> Unit,
onMenuClick: () -> Unit,
menuIcon: ImageVector = Icons.Default.Menu,
menuIcon: @Composable () -> Unit = { Icon(Icons.Default.Menu, "menu") },
visibleItems: List<MenuItem> = listOf(),
overflowItems: List<MenuItem> = listOf(),
) {
TopAppBar(
title = title,
navigationIcon = { IconButton(onMenuClick) { Icon(menuIcon, null) } },
navigationIcon = { IconButton(onMenuClick, content = menuIcon) },
actions = { MainMenu(visibleItems, overflowItems) },
colors = TopAppBarDefaults.topAppBarColors(
MaterialTheme.colorScheme.surfaceColorAtElevation(3.dp).copy(alpha = 0.98f),
Expand Down

0 comments on commit b24d296

Please sign in to comment.