修复 BottomCard 深色模式适配和 DayCell 无障碍支持
This commit is contained in:
parent
b65856a4ae
commit
c86cdd61b8
@ -14,7 +14,6 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -87,7 +86,7 @@ fun BottomCard(
|
||||
.align(Alignment.TopCenter)
|
||||
.padding(top = 8.dp, bottom = 8.dp)
|
||||
.clip(RoundedCornerShape(2.dp))
|
||||
.background(Color.Gray.copy(alpha = 0.4f))
|
||||
.background(MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.4f))
|
||||
.fillMaxWidth(0.15f)
|
||||
.height(4.dp)
|
||||
)
|
||||
|
||||
@ -18,6 +18,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
@ -106,6 +108,10 @@ fun DayCell(
|
||||
Box(
|
||||
modifier = modifier
|
||||
.aspectRatio(1f)
|
||||
.semantics {
|
||||
@Suppress("DEPRECATION")
|
||||
contentDescription = "${date.year}年${date.monthNumber}月${date.day}日"
|
||||
}
|
||||
.clip(CircleShape)
|
||||
.drawBehind {
|
||||
if (revealProgress > 0f) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user