fix(chat): image viewer icons invisible on light backgrounds (#882)

The save/share/close icons and the busy spinner were tinted with
colorScheme.onPrimary, which stays white under dynamic light schemes,
against the viewer's scrim-colored background. Switch to onSurface,
the token designed for content over non-primary surfaces.

Co-authored-by: hy4ri <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andhy4ri authored and GitHub committed 2026-08-12 11:37:04 +03:00
1 parent 345d2e4e89
commit 1ea1596e4e
1 file changed
+4 -4
@@ -204,7 +204,7 @@ fun ImageViewerDialog(
Icon( Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack, imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = stringResource(R.string.image_viewer_close), contentDescription = stringResource(R.string.image_viewer_close),
tint = MaterialTheme.colorScheme.onPrimary, tint = MaterialTheme.colorScheme.onSurface,
) )
} }
Row { Row {
@@ -212,21 +212,21 @@ fun ImageViewerDialog(
CircularProgressIndicator( CircularProgressIndicator(
modifier = Modifier.size(24.dp).padding(horizontal = 8.dp), modifier = Modifier.size(24.dp).padding(horizontal = 8.dp),
strokeWidth = 2.dp, strokeWidth = 2.dp,
color = MaterialTheme.colorScheme.onPrimary, color = MaterialTheme.colorScheme.onSurface,
) )
} else { } else {
IconButton(onClick = onSave, enabled = !isBusy) { IconButton(onClick = onSave, enabled = !isBusy) {
Icon( Icon(
imageVector = Icons.Filled.Download, imageVector = Icons.Filled.Download,
contentDescription = stringResource(R.string.image_viewer_save), contentDescription = stringResource(R.string.image_viewer_save),
tint = MaterialTheme.colorScheme.onPrimary, tint = MaterialTheme.colorScheme.onSurface,
) )
} }
IconButton(onClick = onShare, enabled = !isBusy) { IconButton(onClick = onShare, enabled = !isBusy) {
Icon( Icon(
imageVector = Icons.Filled.Share, imageVector = Icons.Filled.Share,
contentDescription = stringResource(R.string.image_viewer_share), contentDescription = stringResource(R.string.image_viewer_share),
tint = MaterialTheme.colorScheme.onPrimary, tint = MaterialTheme.colorScheme.onSurface,
) )
} }
} }