manager: Update theme color display in MoreSettings screen and adjust title style
This commit is contained in:
@@ -561,14 +561,42 @@ fun MoreSettingsScreen() {
|
|||||||
},
|
},
|
||||||
onClick = { showThemeColorDialog = true },
|
onClick = { showThemeColorDialog = true },
|
||||||
trailingContent = {
|
trailingContent = {
|
||||||
Row {
|
Row(
|
||||||
themeColorOptions.take(4).forEach { (_, theme) ->
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
ColorCircle(
|
modifier = Modifier.padding(start = 8.dp)
|
||||||
color = if (isDarkTheme) theme.primaryDark else theme.primaryLight,
|
) {
|
||||||
isSelected = ThemeConfig.currentTheme::class == theme::class,
|
// 显示当前主题的三种主题色调
|
||||||
modifier = Modifier.padding(horizontal = 2.dp)
|
val theme = ThemeConfig.currentTheme
|
||||||
)
|
val isDark = isSystemInDarkTheme()
|
||||||
}
|
|
||||||
|
// Primary color
|
||||||
|
ColorCircle(
|
||||||
|
color = if (isDark) theme.primaryDark else theme.primaryLight,
|
||||||
|
isSelected = false,
|
||||||
|
modifier = Modifier.padding(horizontal = 2.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Secondary color
|
||||||
|
ColorCircle(
|
||||||
|
color = if (isDark) theme.secondaryDark else theme.secondaryLight,
|
||||||
|
isSelected = false,
|
||||||
|
modifier = Modifier.padding(horizontal = 2.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Tertiary color
|
||||||
|
ColorCircle(
|
||||||
|
color = if (isDark) theme.tertiaryDark else theme.tertiaryLight,
|
||||||
|
isSelected = false,
|
||||||
|
modifier = Modifier.padding(horizontal = 2.dp)
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
|
|
||||||
|
Icon(
|
||||||
|
Icons.AutoMirrored.Filled.NavigateNext,
|
||||||
|
contentDescription = null,
|
||||||
|
tint = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -1188,7 +1216,7 @@ fun SettingsCard(
|
|||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
style = MaterialTheme.typography.titleLarge,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
content()
|
content()
|
||||||
|
|||||||
Reference in New Issue
Block a user