This commit is contained in:
callebtc
2025-07-10 00:03:15 +02:00
parent ae5f187091
commit 215383e012
2 changed files with 21 additions and 7 deletions
@@ -198,7 +198,15 @@ private fun PrivateChatHeader(
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
IconButton(onClick = onBackClick) {
// Fixed: Make back button wider to prevent text cropping
Button(
onClick = onBackClick,
colors = ButtonDefaults.buttonColors(
containerColor = Color.Transparent,
contentColor = colorScheme.primary
),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 4.dp)
) {
Text(
text = "← back",
style = MaterialTheme.typography.bodyMedium,
@@ -42,11 +42,11 @@ fun MessageInput(
modifier = modifier.padding(horizontal = 12.dp, vertical = 8.dp), // Reduced padding
verticalAlignment = Alignment.CenterVertically
) {
// Prompt
// Fixed: Remove arrow from private message input
Text(
text = when {
selectedPrivatePeer != null -> "<@$nickname>"
currentChannel != null -> "<@$nickname> →" // Could show if channel is encrypted
selectedPrivatePeer != null -> "<@$nickname>" // Removed arrow for private
currentChannel != null -> "<@$nickname> →" // Keep arrow for channels
else -> "<@$nickname>"
},
style = MaterialTheme.typography.bodySmall.copy(fontWeight = FontWeight.Medium),
@@ -76,7 +76,7 @@ fun MessageInput(
Spacer(modifier = Modifier.width(8.dp)) // Reduced spacing
// Send button - solid bright green background with thick transparent arrow
// Fixed: Make send button orange in private mode to match nickname color
IconButton(
onClick = onSend,
modifier = Modifier.size(32.dp)
@@ -85,7 +85,10 @@ fun MessageInput(
modifier = Modifier
.size(30.dp)
.background(
color = if (colorScheme.background == Color.Black) {
color = if (selectedPrivatePeer != null) {
// Orange for private messages to match nickname color
Color(0xFFFF8C00).copy(alpha = 0.75f)
} else if (colorScheme.background == Color.Black) {
Color(0xFF00FF00).copy(alpha = 0.75f) // Bright green for dark theme
} else {
Color(0xFF008000).copy(alpha = 0.75f) // Dark green for light theme
@@ -100,7 +103,10 @@ fun MessageInput(
fontSize = 20.sp,
fontWeight = FontWeight.Bold
),
color = if (colorScheme.background == Color.Black) {
color = if (selectedPrivatePeer != null) {
// Black arrow on orange in private mode
Color.Black
} else if (colorScheme.background == Color.Black) {
Color.Black // Black arrow on bright green in dark theme
} else {
Color.White // White arrow on dark green in light theme