From 62ed8bd09a02d2c4b75e77ec7c61ae07b48e5985 Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 9 Jul 2026 16:46:38 +0800 Subject: [PATCH] fix(shift): align anchor date with cycle row and trim top padding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 顶部内边距过高:Scaffold padding 已含 TopAppBar 间距, Column 去掉多余 vertical=8.dp,避免叠加 - 锚点日期右侧不齐:TextButton 自带内边距导致右边缘内缩, 改为 Text+clickable 与"周期"行纯 Text 结构一致,右侧对齐 --- .../kotlin/plus/rua/project/ui/ShiftPatternScreen.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/src/main/kotlin/plus/rua/project/ui/ShiftPatternScreen.kt b/core/src/main/kotlin/plus/rua/project/ui/ShiftPatternScreen.kt index df54587..4ba05cb 100644 --- a/core/src/main/kotlin/plus/rua/project/ui/ShiftPatternScreen.kt +++ b/core/src/main/kotlin/plus/rua/project/ui/ShiftPatternScreen.kt @@ -1,5 +1,6 @@ package plus.rua.project.ui +import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.ExperimentalLayoutApi @@ -99,7 +100,7 @@ fun ShiftPatternScreen(onBack: () -> Unit) { .fillMaxSize() .padding(padding) .verticalScroll(rememberScrollState()) - .padding(horizontal = 16.dp, vertical = 8.dp), + .padding(horizontal = 16.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { Text("基础周期", style = MaterialTheme.typography.titleSmall, fontWeight = FontWeight.SemiBold) @@ -117,9 +118,12 @@ fun ShiftPatternScreen(onBack: () -> Unit) { verticalAlignment = Alignment.CenterVertically ) { Text("锚点日期", style = MaterialTheme.typography.bodyMedium) - TextButton(onClick = { showAnchorPicker = true }) { - Text(pattern.anchorDate.toString()) - } + Text( + text = pattern.anchorDate.toString(), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.primary, + modifier = Modifier.clickable { showAnchorPicker = true } + ) } Row( modifier = Modifier.fillMaxWidth(),