From 9c5f8903588bd6cd376779dfedb1eeb7f3d64da4 Mon Sep 17 00:00:00 2001 From: kari-ts <135075563+kari-ts@users.noreply.github.com> Date: Wed, 7 Jan 2026 11:00:19 -0800 Subject: [PATCH] android: fix progress bar gap (#726) androidx.compose.material3 1.3.0 added a gap between the active and inactive track and a stop indicator at the end. Here, we add a negative gap to compensate for the rounded cap occupying extra space past the end of the progress, and use an empty function to hide the indicator. Fixes tailscale/corp#35495 Signed-off-by: kari-ts --- .../src/main/java/com/tailscale/ipn/ui/view/SharedViews.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/tailscale/ipn/ui/view/SharedViews.kt b/android/src/main/java/com/tailscale/ipn/ui/view/SharedViews.kt index e0b5169..a612ef2 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/view/SharedViews.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/view/SharedViews.kt @@ -126,10 +126,15 @@ fun SimpleActivityIndicator(size: Int = 32) { @Composable fun ActivityIndicator(progress: Double, size: Int = 32) { + // LinearProgressIndicator defaults to a 4.dp height in Material3. + val height = 4.dp + LinearProgressIndicator( - progress = progress.toFloat(), + progress = {progress.toFloat()}, modifier = Modifier.width(size.dp), color = ts_color_light_blue, trackColor = MaterialTheme.colorScheme.secondary, + gapSize = -height, + drawStopIndicator = {} ) }