From 78f03ada990ea6b94b9c31570ed892fa91600911 Mon Sep 17 00:00:00 2001 From: Bruno Deanoz Date: Sun, 21 Jun 2026 17:37:28 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20clean=20up=20mode=20pills=20=E2=80=94=20?= =?UTF-8?q?remove=20muddy=20amber=20tint,=20use=20solid=20surface=20fills?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Active pills now use cs.surface at high opacity instead of transparent Amber overlay. Removed amber from borders and icons, unified to neutral glass border. Active state distinguished by higher fill + semibold weight. --- .../dev/kaizen/app/chat/ChatComponents.kt | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt b/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt index 7365a2b..bbe19bc 100644 --- a/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt +++ b/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt @@ -148,12 +148,9 @@ fun ModePillsRow(selected: Int, onSelect: (Int) -> Unit, modifier: Modifier = Mo val cs = MaterialTheme.colorScheme val isDark = isSystemInDarkTheme() - val glassBorderInactive = remember(isDark) { - if (isDark) Brush.verticalGradient(listOf(Color.White.copy(alpha = 0.12f), Color.White.copy(alpha = 0.02f))) - else Brush.verticalGradient(listOf(Color.White.copy(alpha = 0.45f), Color.Black.copy(alpha = 0.04f))) - } - val glassBorderActive = remember(isDark) { - Brush.verticalGradient(listOf(Amber.copy(alpha = 0.50f), Amber.copy(alpha = 0.15f))) + val glassBorder = remember(isDark) { + if (isDark) Brush.verticalGradient(listOf(Color.White.copy(alpha = 0.14f), Color.White.copy(alpha = 0.04f))) + else Brush.verticalGradient(listOf(Color.White.copy(alpha = 0.50f), Color.Black.copy(alpha = 0.06f))) } Row( @@ -166,22 +163,24 @@ fun ModePillsRow(selected: Int, onSelect: (Int) -> Unit, modifier: Modifier = Mo chatModes.forEach { mode -> val label = stringResource(mode.labelRes) val active = mode.labelRes == selected - val backgroundFill = if (active) Amber.copy(alpha = 0.16f) - else if (isDark) Color(0x12FFFFFF) else Color(0x82FFFFFF) - val borderBrush = if (active) glassBorderActive else glassBorderInactive + val backgroundFill = if (active) { + if (isDark) cs.surface.copy(alpha = 0.8f) else cs.surface.copy(alpha = 0.88f) + } else { + if (isDark) cs.surface.copy(alpha = 0.35f) else cs.surface.copy(alpha = 0.55f) + } Row( Modifier .clip(KaizenShapes.pill) .background(backgroundFill) - .border(1.2.dp, borderBrush, KaizenShapes.pill) + .border(1.2.dp, glassBorder, KaizenShapes.pill) .clickable { onSelect(mode.labelRes) } .padding(horizontal = 13.dp, vertical = 8.dp), verticalAlignment = Alignment.CenterVertically, ) { - Icon(mode.icon, null, tint = if (active) Amber else cs.onSurfaceVariant, modifier = Modifier.size(16.dp)) + Icon(mode.icon, null, tint = if (active) cs.onBackground else cs.onSurfaceVariant, modifier = Modifier.size(16.dp)) Spacer(Modifier.width(6.dp)) - Text(label, color = if (active) cs.onBackground else cs.onSurfaceVariant, fontSize = 13.sp, fontWeight = FontWeight.Medium) + Text(label, color = if (active) cs.onBackground else cs.onSurfaceVariant, fontSize = 13.sp, fontWeight = if (active) FontWeight.SemiBold else FontWeight.Medium) } } }