change color for full-cover icon & reading button

also remove the divider of related-titles in tablet view
This commit is contained in:
Cuong-Tran 2024-06-22 20:53:59 +07:00
parent f1e0c51e6c
commit 1c61efd8e9
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
2 changed files with 36 additions and 2 deletions

View file

@ -498,6 +498,9 @@ private fun MangaScreenSmallImpl(
icon = { Icon(imageVector = Icons.Filled.PlayArrow, contentDescription = null) }, icon = { Icon(imageVector = Icons.Filled.PlayArrow, contentDescription = null) },
onClick = onContinueReading, onClick = onContinueReading,
expanded = chapterListState.isScrollingUp() || chapterListState.isScrolledToEnd(), expanded = chapterListState.isScrollingUp() || chapterListState.isScrolledToEnd(),
// KMK -->
containerColor = MaterialTheme.colorScheme.primary,
// KMK <--
) )
} }
}, },
@ -897,6 +900,9 @@ private fun MangaScreenLargeImpl(
icon = { Icon(imageVector = Icons.Filled.PlayArrow, contentDescription = null) }, icon = { Icon(imageVector = Icons.Filled.PlayArrow, contentDescription = null) },
onClick = onContinueReading, onClick = onContinueReading,
expanded = chapterListState.isScrollingUp() || chapterListState.isScrolledToEnd(), expanded = chapterListState.isScrollingUp() || chapterListState.isScrolledToEnd(),
// KMK -->
containerColor = MaterialTheme.colorScheme.primary,
// KMK <--
) )
} }
}, },
@ -1022,7 +1028,6 @@ private fun MangaScreenLargeImpl(
if (state.source !is StubSource && relatedMangasEnabled) { if (state.source !is StubSource && relatedMangasEnabled) {
if (expandRelatedMangas) { if (expandRelatedMangas) {
if (state.relatedMangasSorted?.isNotEmpty() != false) { if (state.relatedMangasSorted?.isNotEmpty() != false) {
item { HorizontalDivider() }
item( item(
key = MangaScreenItem.RELATED_TITLES, key = MangaScreenItem.RELATED_TITLES,
contentType = MangaScreenItem.RELATED_TITLES, contentType = MangaScreenItem.RELATED_TITLES,

View file

@ -19,9 +19,11 @@ import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.MenuDefaults
import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.contentColorFor
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
@ -91,6 +93,9 @@ fun MangaCoverDialog(
Icon( Icon(
imageVector = Icons.Outlined.Close, imageVector = Icons.Outlined.Close,
contentDescription = stringResource(MR.strings.action_close), contentDescription = stringResource(MR.strings.action_close),
// KMK -->
tint = contentColorFor(MaterialTheme.colorScheme.secondaryContainer),
// KMK <--
) )
} }
} }
@ -102,11 +107,17 @@ fun MangaCoverDialog(
title = stringResource(MR.strings.action_share), title = stringResource(MR.strings.action_share),
icon = Icons.Outlined.Share, icon = Icons.Outlined.Share,
onClick = onShareClick, onClick = onShareClick,
// KMK -->
iconTint = contentColorFor(MaterialTheme.colorScheme.secondaryContainer),
// KMK <--
), ),
AppBar.Action( AppBar.Action(
title = stringResource(MR.strings.action_save), title = stringResource(MR.strings.action_save),
icon = Icons.Outlined.Save, icon = Icons.Outlined.Save,
onClick = onSaveClick, onClick = onSaveClick,
// KMK -->
iconTint = contentColorFor(MaterialTheme.colorScheme.secondaryContainer),
// KMK <--
), ),
), ),
) )
@ -125,12 +136,18 @@ fun MangaCoverDialog(
Icon( Icon(
imageVector = Icons.Outlined.Edit, imageVector = Icons.Outlined.Edit,
contentDescription = stringResource(MR.strings.action_edit_cover), contentDescription = stringResource(MR.strings.action_edit_cover),
// KMK -->
tint = contentColorFor(MaterialTheme.colorScheme.secondaryContainer),
// KMK <--
) )
} }
DropdownMenu( DropdownMenu(
expanded = expanded, expanded = expanded,
onDismissRequest = { expanded = false }, onDismissRequest = { expanded = false },
offset = DpOffset(8.dp, 0.dp), offset = DpOffset(8.dp, 0.dp),
// KMK -->
modifier = Modifier.background(MaterialTheme.colorScheme.surfaceVariant),
// KMK <--
) { ) {
DropdownMenuItem( DropdownMenuItem(
text = { Text(text = stringResource(MR.strings.action_edit)) }, text = { Text(text = stringResource(MR.strings.action_edit)) },
@ -138,6 +155,11 @@ fun MangaCoverDialog(
onEditClick(EditCoverAction.EDIT) onEditClick(EditCoverAction.EDIT)
expanded = false expanded = false
}, },
// KMK -->
colors = MenuDefaults.itemColors().copy(
textColor = contentColorFor(MaterialTheme.colorScheme.surfaceVariant),
),
// KMK <--
) )
DropdownMenuItem( DropdownMenuItem(
text = { Text(text = stringResource(MR.strings.action_delete)) }, text = { Text(text = stringResource(MR.strings.action_delete)) },
@ -145,6 +167,11 @@ fun MangaCoverDialog(
onEditClick(EditCoverAction.DELETE) onEditClick(EditCoverAction.DELETE)
expanded = false expanded = false
}, },
// KMK -->
colors = MenuDefaults.itemColors().copy(
textColor = contentColorFor(MaterialTheme.colorScheme.surfaceVariant),
),
// KMK <--
) )
} }
} }
@ -204,7 +231,9 @@ private fun ActionsPill(content: @Composable () -> Unit) {
Row( Row(
modifier = Modifier modifier = Modifier
.clip(MaterialTheme.shapes.extraLarge) .clip(MaterialTheme.shapes.extraLarge)
.background(MaterialTheme.colorScheme.background.copy(alpha = 0.95f)), // KMK -->
.background(MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.95f)),
// KMK <--
) { ) {
content() content()
} }