added menu icons
This commit is contained in:
parent
2fddacb7e7
commit
2e9a52f4af
@ -26,12 +26,24 @@ import androidx.compose.foundation.text.BasicTextField
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
|
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
|
||||||
import androidx.compose.material.icons.filled.Add
|
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.Check
|
||||||
import androidx.compose.material.icons.filled.Close
|
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.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.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.MoreVert
|
||||||
|
import androidx.compose.material.icons.filled.RemoveDone
|
||||||
import androidx.compose.material.icons.filled.Search
|
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.Card
|
||||||
import androidx.compose.material3.Checkbox
|
import androidx.compose.material3.Checkbox
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
@ -402,6 +414,9 @@ internal fun LibraryScreen(
|
|||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
Box {
|
Box {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Language, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.locale) },
|
text = { Text(strings.locale) },
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = null)
|
Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = null)
|
||||||
@ -445,6 +460,9 @@ internal fun LibraryScreen(
|
|||||||
}
|
}
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Info, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.appVersion(AppVersionDisplay)) },
|
text = { Text(strings.appVersion(AppVersionDisplay)) },
|
||||||
enabled = false,
|
enabled = false,
|
||||||
onClick = {},
|
onClick = {},
|
||||||
@ -927,6 +945,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
|
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.MenuBook, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.open) },
|
text = { Text(strings.open) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -936,6 +957,9 @@ private fun LibraryRow(
|
|||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
if (item.readingStatus != BookReadingStatus.READ) {
|
if (item.readingStatus != BookReadingStatus.READ) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.DoneAll, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.markAsRead) },
|
text = { Text(strings.markAsRead) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -945,6 +969,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
if (item.readingStatus == BookReadingStatus.READ) {
|
if (item.readingStatus == BookReadingStatus.READ) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.RemoveDone, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.markAsUnread) },
|
text = { Text(strings.markAsUnread) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -954,6 +981,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
if (item.readingStatus != BookReadingStatus.TO_READ) {
|
if (item.readingStatus != BookReadingStatus.TO_READ) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.BookmarkAdd, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.markToRead) },
|
text = { Text(strings.markToRead) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -963,6 +993,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
if (item.readingStatus != BookReadingStatus.NEW) {
|
if (item.readingStatus != BookReadingStatus.NEW) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.BookmarkRemove, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(if (item.readingStatus == BookReadingStatus.TO_READ) strings.removeToRead else strings.removeMarks) },
|
text = { Text(if (item.readingStatus == BookReadingStatus.TO_READ) strings.removeToRead else strings.removeMarks) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -971,6 +1004,12 @@ private fun LibraryRow(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
DropdownMenuItem(
|
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) },
|
text = { Text(if (item.favorite) strings.removeFavorite else strings.addFavorite) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -978,6 +1017,9 @@ private fun LibraryRow(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.VisibilityOff, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.notInterested) },
|
text = { Text(strings.notInterested) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -989,6 +1031,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
if (showShareAction) {
|
if (showShareAction) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Share, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.share) },
|
text = { Text(strings.share) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -998,6 +1043,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
if (showViewFileAction) {
|
if (showViewFileAction) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.FolderOpen, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.viewFile) },
|
text = { Text(strings.viewFile) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -1007,6 +1055,9 @@ private fun LibraryRow(
|
|||||||
}
|
}
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Delete, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.delete) },
|
text = { Text(strings.delete) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
|
|||||||
@ -17,17 +17,27 @@ import androidx.compose.foundation.rememberScrollState
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.automirrored.filled.VolumeUp
|
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.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.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.MoreVert
|
||||||
import androidx.compose.material.icons.filled.Palette
|
import androidx.compose.material.icons.filled.Palette
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material.icons.filled.Replay
|
import androidx.compose.material.icons.filled.Replay
|
||||||
import androidx.compose.material.icons.filled.RestartAlt
|
import androidx.compose.material.icons.filled.RestartAlt
|
||||||
import androidx.compose.material.icons.filled.Settings
|
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.Stop
|
||||||
import androidx.compose.material.icons.filled.UnfoldLess
|
import androidx.compose.material.icons.filled.UnfoldLess
|
||||||
import androidx.compose.material.icons.filled.UnfoldMore
|
import androidx.compose.material.icons.filled.UnfoldMore
|
||||||
|
import androidx.compose.material.icons.filled.VisibilityOff
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
import androidx.compose.material3.DropdownMenu
|
import androidx.compose.material3.DropdownMenu
|
||||||
@ -468,6 +478,9 @@ private fun CompactReaderTopBar(
|
|||||||
}
|
}
|
||||||
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
|
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Info, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.info) },
|
text = { Text(strings.info) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -475,6 +488,9 @@ private fun CompactReaderTopBar(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Settings, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.readerSettings) },
|
text = { Text(strings.readerSettings) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -483,6 +499,9 @@ private fun CompactReaderTopBar(
|
|||||||
)
|
)
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.DoneAll, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.markAsRead) },
|
text = { Text(strings.markAsRead) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -491,6 +510,9 @@ private fun CompactReaderTopBar(
|
|||||||
)
|
)
|
||||||
if (readingStatus == BookReadingStatus.TO_READ) {
|
if (readingStatus == BookReadingStatus.TO_READ) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.BookmarkRemove, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.removeToRead) },
|
text = { Text(strings.removeToRead) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -499,6 +521,9 @@ private fun CompactReaderTopBar(
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.BookmarkAdd, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.markToRead) },
|
text = { Text(strings.markToRead) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -507,6 +532,9 @@ private fun CompactReaderTopBar(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.VisibilityOff, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.notInterested) },
|
text = { Text(strings.notInterested) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -514,6 +542,9 @@ private fun CompactReaderTopBar(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.BookmarkRemove, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.clearMarks) },
|
text = { Text(strings.clearMarks) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -521,6 +552,12 @@ private fun CompactReaderTopBar(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(
|
||||||
|
if (favorite) Icons.Filled.Favorite else Icons.Filled.FavoriteBorder,
|
||||||
|
contentDescription = null,
|
||||||
|
)
|
||||||
|
},
|
||||||
text = { Text(if (favorite) strings.removeFavorite else strings.addFavorite) },
|
text = { Text(if (favorite) strings.removeFavorite else strings.addFavorite) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -532,6 +569,9 @@ private fun CompactReaderTopBar(
|
|||||||
}
|
}
|
||||||
if (showShareAction) {
|
if (showShareAction) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Share, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.share) },
|
text = { Text(strings.share) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -541,6 +581,9 @@ private fun CompactReaderTopBar(
|
|||||||
}
|
}
|
||||||
if (showViewFileAction) {
|
if (showViewFileAction) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.FolderOpen, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.viewFile) },
|
text = { Text(strings.viewFile) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
@ -550,6 +593,9 @@ private fun CompactReaderTopBar(
|
|||||||
}
|
}
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
|
leadingIcon = {
|
||||||
|
Icon(Icons.Filled.Delete, contentDescription = null)
|
||||||
|
},
|
||||||
text = { Text(strings.delete) },
|
text = { Text(strings.delete) },
|
||||||
onClick = {
|
onClick = {
|
||||||
menuOpen = false
|
menuOpen = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user