fix(server): error-тинт строк очистки и удаления сервера
Согласовано с строкой сброса настроек - обе деструктивные операции теперь красные (errorContainer иконка + error заголовок).
This commit is contained in:
1 parent
793ac904e7
commit
b25032b77e
2 files changed
+12
-2
No files matched your search
@@ -123,9 +123,13 @@ fun SettingsEntryRow(
|
||||
trailingRes: Int? = R.drawable.chevron_right_24px,
|
||||
trailingTint: Color = Color.Unspecified,
|
||||
enabled: Boolean = true,
|
||||
iconContainer: Color = MaterialTheme.colorScheme.secondaryContainer,
|
||||
iconTint: Color = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||
titleColorOverride: Color = Color.Unspecified,
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
val titleColor = if (enabled) MaterialTheme.colorScheme.onSurface
|
||||
val titleColor = if (titleColorOverride != Color.Unspecified) titleColorOverride
|
||||
else if (enabled) MaterialTheme.colorScheme.onSurface
|
||||
else MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f)
|
||||
val subtitleColor = if (enabled) MaterialTheme.colorScheme.onSurfaceVariant
|
||||
else MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.38f)
|
||||
@@ -137,7 +141,7 @@ fun SettingsEntryRow(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(Spacing.lg)
|
||||
) {
|
||||
SettingsRowIcon(iconRes, enabled = enabled)
|
||||
SettingsRowIcon(iconRes, enabled = enabled, container = iconContainer, tint = iconTint)
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(title, style = MaterialTheme.typography.bodyLarge, color = titleColor)
|
||||
if (subtitle != null) {
|
||||
|
||||
@@ -286,6 +286,9 @@ fun ServerDetailScreen(
|
||||
title = stringResource(R.string.server_clean_title),
|
||||
subtitle = stringResource(R.string.server_clean_subtitle),
|
||||
trailingRes = null,
|
||||
iconContainer = MaterialTheme.colorScheme.errorContainer,
|
||||
iconTint = MaterialTheme.colorScheme.onErrorContainer,
|
||||
titleColorOverride = MaterialTheme.colorScheme.error,
|
||||
onClick = { showCleanup = true }
|
||||
)
|
||||
}
|
||||
@@ -296,6 +299,9 @@ fun ServerDetailScreen(
|
||||
title = stringResource(R.string.server_delete_app),
|
||||
subtitle = stringResource(R.string.server_delete_app_subtitle),
|
||||
trailingRes = null,
|
||||
iconContainer = MaterialTheme.colorScheme.errorContainer,
|
||||
iconTint = MaterialTheme.colorScheme.onErrorContainer,
|
||||
titleColorOverride = MaterialTheme.colorScheme.error,
|
||||
onClick = { showDelete = true }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user