added menu icons

This commit is contained in:
Sergey Chernov 2026-05-25 10:13:51 +03:00
parent 2fddacb7e7
commit 2e9a52f4af
2 changed files with 97 additions and 0 deletions

View File

@ -26,12 +26,24 @@ import androidx.compose.foundation.text.BasicTextField
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.BookmarkAdd
import androidx.compose.material.icons.filled.BookmarkRemove
import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.DoneAll
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.FavoriteBorder
import androidx.compose.material.icons.filled.FolderOpen
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.KeyboardArrowDown
import androidx.compose.material.icons.filled.Language
import androidx.compose.material.icons.filled.MenuBook
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.RemoveDone
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Share
import androidx.compose.material.icons.filled.VisibilityOff
import androidx.compose.material3.Card
import androidx.compose.material3.Checkbox
import androidx.compose.material3.CircularProgressIndicator
@ -402,6 +414,9 @@ internal fun LibraryScreen(
HorizontalDivider()
Box {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Language, contentDescription = null)
},
text = { Text(strings.locale) },
trailingIcon = {
Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = null)
@ -445,6 +460,9 @@ internal fun LibraryScreen(
}
HorizontalDivider()
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Info, contentDescription = null)
},
text = { Text(strings.appVersion(AppVersionDisplay)) },
enabled = false,
onClick = {},
@ -927,6 +945,9 @@ private fun LibraryRow(
}
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.MenuBook, contentDescription = null)
},
text = { Text(strings.open) },
onClick = {
menuOpen = false
@ -936,6 +957,9 @@ private fun LibraryRow(
HorizontalDivider()
if (item.readingStatus != BookReadingStatus.READ) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.DoneAll, contentDescription = null)
},
text = { Text(strings.markAsRead) },
onClick = {
menuOpen = false
@ -945,6 +969,9 @@ private fun LibraryRow(
}
if (item.readingStatus == BookReadingStatus.READ) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.RemoveDone, contentDescription = null)
},
text = { Text(strings.markAsUnread) },
onClick = {
menuOpen = false
@ -954,6 +981,9 @@ private fun LibraryRow(
}
if (item.readingStatus != BookReadingStatus.TO_READ) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.BookmarkAdd, contentDescription = null)
},
text = { Text(strings.markToRead) },
onClick = {
menuOpen = false
@ -963,6 +993,9 @@ private fun LibraryRow(
}
if (item.readingStatus != BookReadingStatus.NEW) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.BookmarkRemove, contentDescription = null)
},
text = { Text(if (item.readingStatus == BookReadingStatus.TO_READ) strings.removeToRead else strings.removeMarks) },
onClick = {
menuOpen = false
@ -971,6 +1004,12 @@ private fun LibraryRow(
)
}
DropdownMenuItem(
leadingIcon = {
Icon(
if (item.favorite) Icons.Filled.Favorite else Icons.Filled.FavoriteBorder,
contentDescription = null,
)
},
text = { Text(if (item.favorite) strings.removeFavorite else strings.addFavorite) },
onClick = {
menuOpen = false
@ -978,6 +1017,9 @@ private fun LibraryRow(
},
)
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.VisibilityOff, contentDescription = null)
},
text = { Text(strings.notInterested) },
onClick = {
menuOpen = false
@ -989,6 +1031,9 @@ private fun LibraryRow(
}
if (showShareAction) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Share, contentDescription = null)
},
text = { Text(strings.share) },
onClick = {
menuOpen = false
@ -998,6 +1043,9 @@ private fun LibraryRow(
}
if (showViewFileAction) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.FolderOpen, contentDescription = null)
},
text = { Text(strings.viewFile) },
onClick = {
menuOpen = false
@ -1007,6 +1055,9 @@ private fun LibraryRow(
}
HorizontalDivider()
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Delete, contentDescription = null)
},
text = { Text(strings.delete) },
onClick = {
menuOpen = false

View File

@ -17,17 +17,27 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.VolumeUp
import androidx.compose.material.icons.filled.BookmarkAdd
import androidx.compose.material.icons.filled.BookmarkRemove
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.DoneAll
import androidx.compose.material.icons.filled.FastForward
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.FavoriteBorder
import androidx.compose.material.icons.filled.FolderOpen
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.Palette
import androidx.compose.material.icons.filled.PlayArrow
import androidx.compose.material.icons.filled.Replay
import androidx.compose.material.icons.filled.RestartAlt
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.filled.Share
import androidx.compose.material.icons.filled.Stop
import androidx.compose.material.icons.filled.UnfoldLess
import androidx.compose.material.icons.filled.UnfoldMore
import androidx.compose.material.icons.filled.VisibilityOff
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.DropdownMenu
@ -468,6 +478,9 @@ private fun CompactReaderTopBar(
}
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Info, contentDescription = null)
},
text = { Text(strings.info) },
onClick = {
menuOpen = false
@ -475,6 +488,9 @@ private fun CompactReaderTopBar(
},
)
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Settings, contentDescription = null)
},
text = { Text(strings.readerSettings) },
onClick = {
menuOpen = false
@ -483,6 +499,9 @@ private fun CompactReaderTopBar(
)
HorizontalDivider()
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.DoneAll, contentDescription = null)
},
text = { Text(strings.markAsRead) },
onClick = {
menuOpen = false
@ -491,6 +510,9 @@ private fun CompactReaderTopBar(
)
if (readingStatus == BookReadingStatus.TO_READ) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.BookmarkRemove, contentDescription = null)
},
text = { Text(strings.removeToRead) },
onClick = {
menuOpen = false
@ -499,6 +521,9 @@ private fun CompactReaderTopBar(
)
} else {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.BookmarkAdd, contentDescription = null)
},
text = { Text(strings.markToRead) },
onClick = {
menuOpen = false
@ -507,6 +532,9 @@ private fun CompactReaderTopBar(
)
}
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.VisibilityOff, contentDescription = null)
},
text = { Text(strings.notInterested) },
onClick = {
menuOpen = false
@ -514,6 +542,9 @@ private fun CompactReaderTopBar(
},
)
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.BookmarkRemove, contentDescription = null)
},
text = { Text(strings.clearMarks) },
onClick = {
menuOpen = false
@ -521,6 +552,12 @@ private fun CompactReaderTopBar(
},
)
DropdownMenuItem(
leadingIcon = {
Icon(
if (favorite) Icons.Filled.Favorite else Icons.Filled.FavoriteBorder,
contentDescription = null,
)
},
text = { Text(if (favorite) strings.removeFavorite else strings.addFavorite) },
onClick = {
menuOpen = false
@ -532,6 +569,9 @@ private fun CompactReaderTopBar(
}
if (showShareAction) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Share, contentDescription = null)
},
text = { Text(strings.share) },
onClick = {
menuOpen = false
@ -541,6 +581,9 @@ private fun CompactReaderTopBar(
}
if (showViewFileAction) {
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.FolderOpen, contentDescription = null)
},
text = { Text(strings.viewFile) },
onClick = {
menuOpen = false
@ -550,6 +593,9 @@ private fun CompactReaderTopBar(
}
HorizontalDivider()
DropdownMenuItem(
leadingIcon = {
Icon(Icons.Filled.Delete, contentDescription = null)
},
text = { Text(strings.delete) },
onClick = {
menuOpen = false