Fix LIVE badge visibility + checkbox contrast
LIVE badge: explicit Color(0xFF00C853) green with white bold text, no longer uses secondary color scheme which was dark-on-dark. Checkbox: show faint white RadioButtonUnchecked when not selected so user can see the selection zone on dark/thumbnail backgrounds.
This commit is contained in:
@@ -10,10 +10,12 @@ import androidx.compose.foundation.lazy.LazyListState
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.CheckCircle
|
import androidx.compose.material.icons.filled.CheckCircle
|
||||||
import androidx.compose.material.icons.filled.Image
|
import androidx.compose.material.icons.filled.Image
|
||||||
|
import androidx.compose.material.icons.filled.RadioButtonUnchecked
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.ImageBitmap
|
import androidx.compose.ui.graphics.ImageBitmap
|
||||||
import androidx.compose.ui.graphics.toComposeImageBitmap
|
import androidx.compose.ui.graphics.toComposeImageBitmap
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
@@ -255,14 +257,25 @@ private fun DenseThumb(
|
|||||||
Icon(Icons.Default.CheckCircle, contentDescription = null,
|
Icon(Icons.Default.CheckCircle, contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.primary,
|
tint = MaterialTheme.colorScheme.primary,
|
||||||
modifier = Modifier.align(Alignment.TopEnd).padding(2.dp).size(16.dp))
|
modifier = Modifier.align(Alignment.TopEnd).padding(2.dp).size(16.dp))
|
||||||
|
} else {
|
||||||
|
// Faint unchecked indicator so user knows cell is tappable
|
||||||
|
Icon(Icons.Default.RadioButtonUnchecked, contentDescription = null,
|
||||||
|
tint = Color.White.copy(alpha = 0.5f),
|
||||||
|
modifier = Modifier.align(Alignment.TopEnd).padding(2.dp).size(14.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bottom-left: LIVE badge or video size badge
|
// Bottom-left: LIVE badge or video size badge
|
||||||
if (photo.isLivePhotoStill) {
|
if (photo.isLivePhotoStill) {
|
||||||
Badge(
|
Box(
|
||||||
containerColor = MaterialTheme.colorScheme.secondary.copy(alpha = 0.85f),
|
modifier = Modifier
|
||||||
modifier = Modifier.align(Alignment.BottomStart).padding(2.dp),
|
.align(Alignment.BottomStart)
|
||||||
) { Text("LIVE", style = MaterialTheme.typography.labelSmall) }
|
.padding(3.dp)
|
||||||
|
.background(Color(0xFF00C853), shape = MaterialTheme.shapes.extraSmall)
|
||||||
|
.padding(horizontal = 4.dp, vertical = 1.dp),
|
||||||
|
) {
|
||||||
|
Text("LIVE", fontSize = 9.sp, fontWeight = FontWeight.Bold,
|
||||||
|
color = Color.White)
|
||||||
|
}
|
||||||
} else if (photo.mediaType == MediaType.VIDEO) {
|
} else if (photo.mediaType == MediaType.VIDEO) {
|
||||||
val sizeLabel = if (photo.sizeBytes > 1024 * 1024)
|
val sizeLabel = if (photo.sizeBytes > 1024 * 1024)
|
||||||
"▶ ${photo.sizeBytes / (1024 * 1024)}MB"
|
"▶ ${photo.sizeBytes / (1024 * 1024)}MB"
|
||||||
|
|||||||
Reference in New Issue
Block a user