From 0ade063b34c0a6a1b113a2575f206f87c264e1c4 Mon Sep 17 00:00:00 2001 From: Bruno Deanoz Date: Tue, 23 Jun 2026 01:02:07 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20improve=20message=20action=20buttons=20?= =?UTF-8?q?=E2=80=94=20larger,=20visible,=20subtle=20background?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Buttons: 30dp→34dp with squircle shape (KaizenShapes.sm), subtle tinted background (dark: white 4%, light: black 2.5%), icons 16→17dp. Tint alpha raised from 0.35→0.50 (copy/regenerate/volume) and 0.6→0.70 (delete) so buttons are actually visible in both light and dark mode. Spacing 2→4dp between buttons, top padding 4→6dp. --- .../dev/kaizen/app/chat/ChatComponents.kt | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 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 e3519bd..835d953 100644 --- a/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt +++ b/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt @@ -395,12 +395,12 @@ fun MessageRow( } if (!message.streaming) { Row( - Modifier.padding(top = 4.dp, end = 4.dp), - horizontalArrangement = Arrangement.spacedBy(2.dp), + Modifier.padding(top = 6.dp, end = 4.dp), + horizontalArrangement = Arrangement.spacedBy(4.dp), ) { MessageActionButton( icon = if (copied) KaizenIcons.Check else KaizenIcons.Copy, - tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.35f), + tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.50f), ) { haptics.tick() copied = true @@ -411,7 +411,7 @@ fun MessageRow( } } onDelete?.let { del -> - MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.6f)) { + MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.70f)) { haptics.tick(); del(message.wireId) } } @@ -448,12 +448,12 @@ fun MessageRow( } if (!message.streaming && !message.thinking && message.content.isNotBlank()) { Row( - Modifier.padding(start = 38.dp, top = 4.dp), - horizontalArrangement = Arrangement.spacedBy(2.dp), + Modifier.padding(start = 38.dp, top = 6.dp), + horizontalArrangement = Arrangement.spacedBy(4.dp), ) { MessageActionButton( icon = if (copied) KaizenIcons.Check else KaizenIcons.Copy, - tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.35f), + tint = if (copied) Color(0xFF10B981) else cs.onSurfaceVariant.copy(alpha = 0.50f), ) { haptics.tick() copied = true @@ -466,18 +466,18 @@ fun MessageRow( onReadAloud?.let { readAloud -> MessageActionButton( icon = KaizenIcons.Volume2, - tint = if (isPlayingTts) accent.primary else cs.onSurfaceVariant.copy(alpha = 0.35f), + tint = if (isPlayingTts) accent.primary else cs.onSurfaceVariant.copy(alpha = 0.50f), ) { haptics.tick(); readAloud(message.content) } } onRegenerate?.let { regen -> - MessageActionButton(KaizenIcons.RefreshCw, cs.onSurfaceVariant.copy(alpha = 0.35f)) { + MessageActionButton(KaizenIcons.RefreshCw, cs.onSurfaceVariant.copy(alpha = 0.50f)) { haptics.tick(); regen(message.wireId) } } onDelete?.let { del -> - MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.6f)) { + MessageActionButton(KaizenIcons.Trash, Color(0xFFEF4444).copy(alpha = 0.70f)) { haptics.tick(); del(message.wireId) } } @@ -489,14 +489,16 @@ fun MessageRow( @Composable private fun MessageActionButton(icon: ImageVector, tint: Color, onClick: () -> Unit) { + val isDark = isSystemInDarkTheme() Box( Modifier - .size(30.dp) - .clip(KaizenShapes.circle) + .size(34.dp) + .clip(KaizenShapes.sm) + .background(if (isDark) Color(0x0AFFFFFF) else Color(0x06000000)) .clickable(onClick = onClick), contentAlignment = Alignment.Center, ) { - Icon(icon, null, tint = tint, modifier = Modifier.size(16.dp)) + Icon(icon, null, tint = tint, modifier = Modifier.size(17.dp)) } }