mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 20:57:24 +01:00
Fix manga info header using wrong text color (fixes #7368)
This commit is contained in:
parent
0e0c1dcdc5
commit
37fe25ac06
@ -123,7 +123,6 @@ private fun ScaffoldLayout(
|
|||||||
snackbar: @Composable () -> Unit,
|
snackbar: @Composable () -> Unit,
|
||||||
fab: @Composable () -> Unit,
|
fab: @Composable () -> Unit,
|
||||||
bottomBar: @Composable () -> Unit,
|
bottomBar: @Composable () -> Unit,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
SubcomposeLayout { constraints ->
|
SubcomposeLayout { constraints ->
|
||||||
val layoutWidth = constraints.maxWidth
|
val layoutWidth = constraints.maxWidth
|
||||||
|
@ -35,6 +35,7 @@ import androidx.compose.material.icons.filled.Schedule
|
|||||||
import androidx.compose.material.icons.filled.Sync
|
import androidx.compose.material.icons.filled.Sync
|
||||||
import androidx.compose.material.icons.filled.Warning
|
import androidx.compose.material.icons.filled.Warning
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.material3.LocalMinimumTouchTargetEnforcement
|
import androidx.compose.material3.LocalMinimumTouchTargetEnforcement
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.ProvideTextStyle
|
import androidx.compose.material3.ProvideTextStyle
|
||||||
@ -129,6 +130,7 @@ fun MangaInfoHeader(
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Manga & source info
|
// Manga & source info
|
||||||
|
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onSurface) {
|
||||||
if (windowWidthSizeClass == WindowWidthSizeClass.Compact) {
|
if (windowWidthSizeClass == WindowWidthSizeClass.Compact) {
|
||||||
MangaAndSourceTitlesSmall(
|
MangaAndSourceTitlesSmall(
|
||||||
appBarPadding = appBarPadding,
|
appBarPadding = appBarPadding,
|
||||||
@ -159,6 +161,7 @@ fun MangaInfoHeader(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Action buttons
|
// Action buttons
|
||||||
Row(modifier = Modifier.padding(start = 16.dp, top = 8.dp, end = 16.dp)) {
|
Row(modifier = Modifier.padding(start = 16.dp, top = 8.dp, end = 16.dp)) {
|
||||||
@ -409,13 +412,19 @@ private fun MangaAndSourceTitlesSmall(
|
|||||||
text = title.ifBlank { stringResource(R.string.unknown) },
|
text = title.ifBlank { stringResource(R.string.unknown) },
|
||||||
style = MaterialTheme.typography.titleLarge,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
modifier = Modifier.clickableNoIndication(
|
modifier = Modifier.clickableNoIndication(
|
||||||
onLongClick = { if (title.isNotBlank()) context.copyToClipboard(title, title) },
|
onLongClick = {
|
||||||
|
if (title.isNotBlank()) context.copyToClipboard(
|
||||||
|
title,
|
||||||
|
title,
|
||||||
|
)
|
||||||
|
},
|
||||||
onClick = { if (title.isNotBlank()) doSearch(title, true) },
|
onClick = { if (title.isNotBlank()) doSearch(title, true) },
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
Text(
|
Text(
|
||||||
text = author?.takeIf { it.isNotBlank() } ?: stringResource(R.string.unknown_author),
|
text = author?.takeIf { it.isNotBlank() }
|
||||||
|
?: stringResource(R.string.unknown_author),
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.secondaryItemAlpha()
|
.secondaryItemAlpha()
|
||||||
@ -488,7 +497,12 @@ private fun MangaAndSourceTitlesSmall(
|
|||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = sourceName,
|
text = sourceName,
|
||||||
modifier = Modifier.clickableNoIndication { doSearch(sourceName, false) },
|
modifier = Modifier.clickableNoIndication {
|
||||||
|
doSearch(
|
||||||
|
sourceName,
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user