mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-04 17:29:07 +00:00
feat: amoled mode visisbility adjustments
This commit is contained in:
parent
db3b7d968e
commit
2844f74503
5 changed files with 24 additions and 16 deletions
|
|
@ -211,6 +211,8 @@ private fun NuvioViewAllPill(
|
|||
onClick: (() -> Unit)?,
|
||||
size: NuvioViewAllPillSize,
|
||||
) {
|
||||
val colorScheme = MaterialTheme.colorScheme
|
||||
val isAmoled = colorScheme.background == androidx.compose.ui.graphics.Color.Black && colorScheme.surface == androidx.compose.ui.graphics.Color(0xFF050505)
|
||||
val horizontalPadding = if (size == NuvioViewAllPillSize.Compact) 12.dp else 18.dp
|
||||
val verticalPadding = if (size == NuvioViewAllPillSize.Compact) 9.dp else 14.dp
|
||||
val textStyle = if (size == NuvioViewAllPillSize.Compact) {
|
||||
|
|
@ -223,7 +225,7 @@ private fun NuvioViewAllPill(
|
|||
Row(
|
||||
modifier = Modifier
|
||||
.background(
|
||||
color = MaterialTheme.colorScheme.surface,
|
||||
color = if (isAmoled) androidx.compose.ui.graphics.Color(0xFF0D0D0D) else colorScheme.surface,
|
||||
shape = RoundedCornerShape(20.dp),
|
||||
)
|
||||
.then(if (onClick != null) Modifier.clickable(onClick = onClick) else Modifier)
|
||||
|
|
|
|||
|
|
@ -185,7 +185,9 @@ fun MetaDetailsScreen(
|
|||
}
|
||||
|
||||
Box(
|
||||
modifier = modifier.fillMaxSize(),
|
||||
modifier = modifier
|
||||
.fillMaxSize()
|
||||
.background(MaterialTheme.colorScheme.background),
|
||||
) {
|
||||
when {
|
||||
displayedMeta == null && uiState.isLoading -> {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import androidx.compose.runtime.getValue
|
|||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
|
@ -159,6 +160,8 @@ private fun CommentCard(
|
|||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val colorScheme = MaterialTheme.colorScheme
|
||||
val isAmoled = colorScheme.background == Color.Black && colorScheme.surface == Color(0xFF050505)
|
||||
val bodyText = if (review.hasSpoilerContent) {
|
||||
"This comment contains spoilers."
|
||||
} else {
|
||||
|
|
@ -176,7 +179,7 @@ private fun CommentCard(
|
|||
.height(cardHeight)
|
||||
.clickable(onClick = onClick),
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.5f),
|
||||
color = if (isAmoled) Color(0xFF121212) else colorScheme.surfaceVariant.copy(alpha = 0.5f),
|
||||
tonalElevation = 1.dp,
|
||||
) {
|
||||
Column(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import androidx.compose.foundation.lazy.LazyListScope
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.CollectionsBookmark
|
||||
import androidx.compose.material.icons.rounded.Extension
|
||||
import androidx.compose.material.icons.rounded.Home
|
||||
import androidx.compose.material.icons.rounded.Hub
|
||||
import androidx.compose.material.icons.rounded.Tune
|
||||
|
||||
|
|
@ -50,7 +51,7 @@ internal fun LazyListScope.contentDiscoveryContent(
|
|||
SettingsNavigationRow(
|
||||
title = "Homescreen",
|
||||
description = "Control which catalogs appear on Home and in what order.",
|
||||
icon = Icons.Rounded.Tune,
|
||||
icon = Icons.Rounded.Home,
|
||||
isTablet = isTablet,
|
||||
onClick = onHomescreenClick,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import androidx.compose.foundation.layout.width
|
|||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.rounded.ArrowForward
|
||||
import androidx.compose.material.icons.rounded.Lock
|
||||
import androidx.compose.material.icons.rounded.Menu
|
||||
import androidx.compose.material3.Icon
|
||||
|
|
@ -44,6 +43,7 @@ import androidx.compose.ui.layout.ContentScale
|
|||
import androidx.compose.ui.platform.LocalHapticFeedback
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.nuvio.app.core.ui.NuvioActionLabel
|
||||
import com.nuvio.app.core.ui.NuvioBackButton
|
||||
|
|
@ -57,13 +57,15 @@ private fun SettingsCard(
|
|||
modifier: Modifier = Modifier,
|
||||
content: @Composable ColumnScope.() -> Unit,
|
||||
) {
|
||||
val colorScheme = MaterialTheme.colorScheme
|
||||
val isAmoled = colorScheme.background == Color.Black && colorScheme.surface == Color(0xFF050505)
|
||||
Surface(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
color = MaterialTheme.colorScheme.surface,
|
||||
color = if (isAmoled) Color(0xFF0B0B0B) else colorScheme.surface,
|
||||
shape = RoundedCornerShape(if (isTablet) 20.dp else 16.dp),
|
||||
border = BorderStroke(
|
||||
0.5.dp,
|
||||
MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.16f),
|
||||
colorScheme.outlineVariant.copy(alpha = if (isAmoled) 0.24f else 0.16f),
|
||||
),
|
||||
) {
|
||||
Column(content = content)
|
||||
|
|
@ -217,13 +219,14 @@ internal fun SettingsNavigationRow(
|
|||
.fillMaxWidth()
|
||||
.clickable(onClick = onClick)
|
||||
.padding(horizontal = horizontalPadding, vertical = verticalPadding),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
horizontalArrangement = Arrangement.Start,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.padding(end = 12.dp)
|
||||
.widthIn(max = if (isTablet) 560.dp else 320.dp),
|
||||
.widthIn(max = if (isTablet) 560.dp else Dp.Unspecified),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
if (icon != null || iconPainter != null) {
|
||||
|
|
@ -271,11 +274,6 @@ internal fun SettingsNavigationRow(
|
|||
)
|
||||
}
|
||||
}
|
||||
Icon(
|
||||
imageVector = Icons.AutoMirrored.Rounded.ArrowForward,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -296,13 +294,14 @@ internal fun SettingsSwitchRow(
|
|||
.fillMaxWidth()
|
||||
.clickable(enabled = enabled) { onCheckedChange(!checked) }
|
||||
.padding(horizontal = horizontalPadding, vertical = verticalPadding),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
horizontalArrangement = Arrangement.Start,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.padding(end = 12.dp)
|
||||
.widthIn(max = if (isTablet) 560.dp else 280.dp)
|
||||
.widthIn(max = if (isTablet) 560.dp else Dp.Unspecified)
|
||||
.alpha(if (enabled) 1f else 0.55f),
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||
) {
|
||||
|
|
@ -324,6 +323,7 @@ internal fun SettingsSwitchRow(
|
|||
checked = checked,
|
||||
onCheckedChange = onCheckedChange,
|
||||
enabled = enabled,
|
||||
modifier = Modifier.padding(start = 4.dp),
|
||||
colors = SwitchDefaults.colors(
|
||||
checkedThumbColor = MaterialTheme.colorScheme.onPrimary,
|
||||
checkedTrackColor = MaterialTheme.colorScheme.primary,
|
||||
|
|
|
|||
Loading…
Reference in a new issue