mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Better colors for prefs
This commit is contained in:
parent
60de501851
commit
70d579eea4
2 changed files with 7 additions and 9 deletions
|
|
@ -36,6 +36,7 @@ import androidx.compose.ui.unit.dp
|
|||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.tv.material3.MaterialTheme
|
||||
import androidx.tv.material3.Text
|
||||
import androidx.tv.material3.surfaceColorAtElevation
|
||||
import com.github.damontecres.dolphin.R
|
||||
import com.github.damontecres.dolphin.preferences.AppPreferences
|
||||
import com.github.damontecres.dolphin.ui.ifElse
|
||||
|
|
@ -133,7 +134,7 @@ fun PreferencesContent(
|
|||
horizontalAlignment = Alignment.Start,
|
||||
verticalArrangement = Arrangement.spacedBy(0.dp),
|
||||
contentPadding = PaddingValues(16.dp),
|
||||
modifier = Modifier.background(MaterialTheme.colorScheme.secondaryContainer),
|
||||
modifier = Modifier.background(MaterialTheme.colorScheme.surfaceColorAtElevation(1.dp)),
|
||||
) {
|
||||
stickyHeader {
|
||||
Text(
|
||||
|
|
@ -152,7 +153,7 @@ fun PreferencesContent(
|
|||
Text(
|
||||
text = stringResource(group.title),
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = MaterialTheme.colorScheme.border,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
textAlign = TextAlign.Start,
|
||||
modifier =
|
||||
Modifier
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import androidx.compose.ui.unit.Dp
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.tv.material3.MaterialTheme
|
||||
import androidx.tv.material3.ProvideTextStyle
|
||||
import androidx.tv.material3.contentColorFor
|
||||
import com.github.damontecres.dolphin.ui.components.SliderBar
|
||||
|
||||
@Composable
|
||||
|
|
@ -40,16 +41,12 @@ fun SliderPreference(
|
|||
val focused = interactionSource.collectIsFocusedAsState().value
|
||||
val background =
|
||||
if (focused) {
|
||||
MaterialTheme.colorScheme.onBackground
|
||||
MaterialTheme.colorScheme.inverseSurface
|
||||
} else {
|
||||
Color.Unspecified
|
||||
}
|
||||
val contentColor =
|
||||
if (focused) {
|
||||
Color.Unspecified
|
||||
} else {
|
||||
MaterialTheme.colorScheme.onSurface
|
||||
}
|
||||
val contentColor = contentColorFor(background)
|
||||
|
||||
Column(
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
modifier =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue