mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 07:34:16 +00:00
Tint disabled feature icons on SIMPLEX
The group banner and the feature-change notices show feature icons; a feature that is off draws in the model's secondary colour — a blue on SIMPLEX — which reads cold over the sunrise gradient while the label beside it already uses the warm tint. On SIMPLEX, route the off (secondary) feature icon through simplexSecondaryTint(), in both the collapsed icon row and the full notice. The green "on" and yellow "partly on" colours, and every other theme, are untouched. This also warms the "you changed a feature" notice icon, which passed a flat secondary.
This commit is contained in:
+4
-2
@@ -13,6 +13,8 @@ import androidx.compose.ui.unit.sp
|
||||
import chat.simplex.common.model.*
|
||||
import chat.simplex.common.model.ChatModel.getChatItemIndexOrNull
|
||||
import chat.simplex.common.platform.onRightClick
|
||||
import chat.simplex.common.ui.theme.CurrentColors
|
||||
import chat.simplex.common.ui.theme.DefaultTheme
|
||||
import chat.simplex.common.ui.theme.simplexSecondaryTint
|
||||
|
||||
@Composable
|
||||
@@ -103,7 +105,7 @@ private fun featureInfo(ci: ChatItem, chatInfo: ChatInfo): FeatureInfo? =
|
||||
|
||||
@Composable
|
||||
private fun FeatureIconView(f: FeatureInfo) {
|
||||
val icon = @Composable { Icon(f.icon.icon, null, Modifier.size(20.dp), tint = f.color) }
|
||||
val icon = @Composable { Icon(f.icon.icon, null, Modifier.size(20.dp), tint = if (CurrentColors.value.base == DefaultTheme.SIMPLEX && f.color == CurrentColors.value.colors.secondary) simplexSecondaryTint() else f.color) }
|
||||
if (f.param != null) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
icon()
|
||||
@@ -126,7 +128,7 @@ private fun FullFeatureView(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||
) {
|
||||
Icon(icon ?: feature.iconFilled(), feature.text, Modifier.size(20.dp), tint = iconColor)
|
||||
Icon(icon ?: feature.iconFilled(), feature.text, Modifier.size(20.dp), tint = if (CurrentColors.value.base == DefaultTheme.SIMPLEX && iconColor == CurrentColors.value.colors.secondary) simplexSecondaryTint() else iconColor)
|
||||
Text(
|
||||
chatEventText(chatItem),
|
||||
Modifier,
|
||||
|
||||
Reference in New Issue
Block a user