mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-30 23:30:32 +01:00
The turn card and the trip card share one width again, as wide as the wider one's words need, so their edges line up
This commit is contained in:
1 parent
e1596d3198
commit
ff9bb83937
1 file changed
+8
-7
@@ -226,19 +226,20 @@ private fun NavigationBars(
|
|||||||
// The turn at the top and the trip in a card of its own at the bottom, with the
|
// 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
|
// 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.
|
// (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
|
// The column is as wide as the wider card's words need, between two thirds of the
|
||||||
// both stretching to it: a short street name left half the turn card empty, and
|
// usual width and all of it, and both cards share that width so their edges line
|
||||||
// the map now gets that space back.
|
// up. A short street name left half the turn card empty; the map gets it back.
|
||||||
Column(
|
Column(
|
||||||
Modifier.widthIn(max = column).fillMaxHeight().covers("nav-cards", cardEdge).padding(12.dp),
|
Modifier.width(androidx.compose.foundation.layout.IntrinsicSize.Max)
|
||||||
|
.widthIn(min = column * 2 / 3, max = column)
|
||||||
|
.fillMaxHeight().covers("nav-cards", cardEdge).padding(12.dp),
|
||||||
verticalArrangement = Arrangement.SpaceBetween,
|
verticalArrangement = Arrangement.SpaceBetween,
|
||||||
horizontalAlignment = if (atEnd) Alignment.End else Alignment.Start,
|
|
||||||
) {
|
) {
|
||||||
if (routing != null) {
|
if (routing != null) {
|
||||||
NavigationCard(routing, Modifier.width(androidx.compose.foundation.layout.IntrinsicSize.Max).weight(1f, fill = false))
|
NavigationCard(routing, Modifier.fillMaxWidth().weight(1f, fill = false))
|
||||||
}
|
}
|
||||||
estimate?.let {
|
estimate?.let {
|
||||||
ChromeSurface(Modifier.width(androidx.compose.foundation.layout.IntrinsicSize.Max).padding(top = if (routing != null) 12.dp else 0.dp)) {
|
ChromeSurface(Modifier.fillMaxWidth().padding(top = if (routing != null) 12.dp else 0.dp)) {
|
||||||
TripRow(it, showStop = !template.actionStrip.hasStop(), Modifier.fillMaxWidth())
|
TripRow(it, showStop = !template.actionStrip.hasStop(), Modifier.fillMaxWidth())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user