Skip to content

Commit 05fe475

Browse files
committed
feat(graphs): use M3 tooltip spec for graph markers
#118
1 parent b7d44a2 commit 05fe475

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/TimeColumnChart.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ fun TimeColumnChart(
122122
),
123123
marker = DefaultCartesianMarker(
124124
TextComponent(
125-
color = colorScheme.surface.toArgb(),
125+
color = colorScheme.inverseOnSurface.toArgb(),
126126
background = ShapeComponent(
127-
fill = fill(colorScheme.onSurface),
128-
shape = CorneredShape.Pill
127+
fill = fill(colorScheme.inverseSurface),
128+
shape = CorneredShape.rounded(8f)
129129
),
130-
textSizeSp = typography.labelSmall.fontSize.value,
131-
lineHeightSp = typography.labelSmall.fontSize.value,
130+
textSizeSp = typography.bodySmall.fontSize.value,
131+
lineHeightSp = typography.bodySmall.lineHeight.value,
132132
padding = Insets(verticalDp = 4f, horizontalDp = 8f),
133133
margins = Insets(bottomDp = 2f)
134134
),
@@ -143,7 +143,7 @@ fun TimeColumnChart(
143143
minZoom = Zoom.min(Zoom.Content, Zoom.fixed())
144144
),
145145
animationSpec = animationSpec,
146-
modifier = modifier.height(224.dp),
146+
modifier = modifier.height(226.dp),
147147
)
148148
}
149149
}

app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/TimeLineChart.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ fun TimeLineChart(
136136
),
137137
marker = DefaultCartesianMarker(
138138
TextComponent(
139-
color = colorScheme.surface.toArgb(),
139+
color = colorScheme.inverseOnSurface.toArgb(),
140140
background = ShapeComponent(
141-
fill = fill(colorScheme.onSurface),
142-
shape = CorneredShape.Pill
141+
fill = fill(colorScheme.inverseSurface),
142+
shape = CorneredShape.rounded(8f)
143143
),
144-
textSizeSp = typography.labelSmall.fontSize.value,
145-
lineHeightSp = typography.labelSmall.fontSize.value,
144+
textSizeSp = typography.bodySmall.fontSize.value,
145+
lineHeightSp = typography.bodySmall.lineHeight.value,
146146
padding = Insets(verticalDp = 4f, horizontalDp = 8f),
147147
margins = Insets(bottomDp = 2f)
148148
),

0 commit comments

Comments
 (0)