From 3773b8e991bdc37f51352c1ecb6b1f0262090281 Mon Sep 17 00:00:00 2001 From: Seb3thehacker Date: Sun, 29 Nov 2026 21:14:08 -0800 Subject: [PATCH] The turn card and the trip card are each as wide as their words, so the map gets the empty space back --- .../app/seb3thehacker/gearslip/car/TemplateChrome.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/car/TemplateChrome.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/car/TemplateChrome.kt index e7e9b72..462793d 100644 --- a/gearslip/src/main/java/app/seb3thehacker/gearslip/car/TemplateChrome.kt +++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/car/TemplateChrome.kt @@ -226,15 +226,19 @@ private fun NavigationBars( // The turn at the top and the trip in a card of its own at the bottom, with the // map showing between them. The trip is measured first, so the turn card shrinks // (dropping parts, see NavigationCard) rather than run into it on a short screen. + // Each card is as wide as its own words, up to the column's width, instead of + // both stretching to it: a short street name left half the turn card empty, and + // the map now gets that space back. Column( - Modifier.width(column).fillMaxHeight().covers("nav-cards", cardEdge).padding(12.dp), + Modifier.widthIn(max = column).fillMaxHeight().covers("nav-cards", cardEdge).padding(12.dp), verticalArrangement = Arrangement.SpaceBetween, + horizontalAlignment = if (atEnd) Alignment.End else Alignment.Start, ) { if (routing != null) { - NavigationCard(routing, Modifier.fillMaxWidth().weight(1f, fill = false)) + NavigationCard(routing, Modifier.width(androidx.compose.foundation.layout.IntrinsicSize.Max).weight(1f, fill = false)) } estimate?.let { - ChromeSurface(Modifier.fillMaxWidth().padding(top = if (routing != null) 12.dp else 0.dp)) { + ChromeSurface(Modifier.width(androidx.compose.foundation.layout.IntrinsicSize.Max).padding(top = if (routing != null) 12.dp else 0.dp)) { TripRow(it, showStop = !template.actionStrip.hasStop(), Modifier.fillMaxWidth()) } }