Set event times in regular weight across the timeline views (#219)

This commit is contained in:
2026-09-04 12:09:03 +02:00
parent 065afdb2b8
commit 5be8884e9f
6 changed files with 107 additions and 89 deletions
@@ -3,6 +3,7 @@ package de.jeanlucmakiola.calendula.ui.month
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import com.google.common.truth.Truth.assertThat
import de.jeanlucmakiola.calendula.ui.common.inlineTimeLabel
import de.jeanlucmakiola.calendula.domain.EventInstance
import kotlinx.datetime.DateTimeUnit
import kotlinx.datetime.LocalDate
@@ -59,7 +60,7 @@ class MonthChipTimeTest {
@Test
fun `the time is set apart from the title it precedes`() {
val label = monthChipLabel("09:05", "Standup", Color.Black)
val label = inlineTimeLabel("09:05", "Standup", Color.Black)
assertThat(label.text).isEqualTo("09:05 Standup")
// Only the time is restyled: the title keeps labelSmall as the theme
// sets it, so the two read as separate things on one line (#219).
@@ -72,7 +73,7 @@ class MonthChipTimeTest {
@Test
fun `a chip without a time is styled title and nothing else`() {
val label = monthChipLabel(null, "Standup", Color.Black)
val label = inlineTimeLabel(null, "Standup", Color.Black)
assertThat(label.text).isEqualTo("Standup")
assertThat(label.spanStyles).isEmpty()
}