From afb1e434e8412b90e89c0f8f3f22d9e61bd53a30 Mon Sep 17 00:00:00 2001 From: atsunatsu Date: Wed, 16 Sep 2026 11:57:11 +0800 Subject: [PATCH] fix(map): constrain VUCC grid selector width to its content The expanded option rows used fillMaxWidth inside a full-screen Box, which stretched the selector's dark surface across the whole map. The Column now sizes to its widest child (IntrinsicSize.Max) so the box is just wide enough for the label, count and expand arrow. --- .../java/com/rtbishop/look4sat/feature/map/MapScreen.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt index 5fec8c8e..f472be10 100644 --- a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt +++ b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt @@ -29,6 +29,7 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.IntrinsicSize import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -659,10 +660,14 @@ private fun VuccGridSelector( shape = RoundedCornerShape(8.dp), modifier = modifier ) { - Column { + // Width = widest child (header or list item), never the full screen: + // the expanded rows use fillMaxWidth, which would otherwise stretch + // this box to the whole map width. + Column(modifier = Modifier.width(IntrinsicSize.Max)) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier + .fillMaxWidth() .clickable { expanded = !expanded } .padding(start = 10.dp, end = 6.dp, top = 4.dp, bottom = 4.dp) ) {