diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt index 9ec042a..f420730 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/CalendarMonthView.kt @@ -2,6 +2,7 @@ package plus.rua.project.ui import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableIntStateOf @@ -23,7 +24,7 @@ fun CalendarMonthView( var currentYear by remember { mutableIntStateOf(viewModel.currentYear) } var currentMonth by remember { mutableIntStateOf(viewModel.currentMonth) } - Column(modifier = modifier.fillMaxSize()) { + Column(modifier = modifier.fillMaxSize().statusBarsPadding()) { MonthHeader( year = currentYear, month = currentMonth, diff --git a/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt b/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt index db4d118..9c2babe 100644 --- a/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt +++ b/shared/src/commonMain/kotlin/plus/rua/project/ui/MonthHeader.kt @@ -6,8 +6,10 @@ import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp @Composable fun MonthHeader( @@ -19,11 +21,17 @@ fun MonthHeader( Row( modifier = modifier .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 12.dp) + .padding(horizontal = 16.dp, vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically ) { Text( - text = "${year}年${month}月 第${weekNumber}周", - style = MaterialTheme.typography.titleMedium + text = "${year}年${month}月", + style = MaterialTheme.typography.titleLarge + ) + Text( + text = " 第${weekNumber}周", + style = MaterialTheme.typography.bodySmall, + fontSize = 13.sp ) } }