@@ -3,6 +3,7 @@ package app.aaps.core.ui.compose.pump
33import androidx.compose.animation.AnimatedVisibility
44import androidx.compose.foundation.layout.Arrangement
55import androidx.compose.foundation.layout.Column
6+ import androidx.compose.foundation.layout.PaddingValues
67import androidx.compose.foundation.layout.Row
78import androidx.compose.foundation.layout.Spacer
89import androidx.compose.foundation.layout.fillMaxSize
@@ -86,11 +87,11 @@ private fun CommunicationStatusCard(banner: StatusBanner?, queueStatus: String?)
8687 if (banner == null && queueStatus == null ) return
8788
8889 val (bgColor, fgColor) = when (banner?.level) {
89- StatusLevel .CRITICAL -> MaterialTheme .colorScheme.errorContainer to MaterialTheme .colorScheme.onErrorContainer
90- StatusLevel .WARNING -> MaterialTheme .colorScheme.tertiaryContainer to MaterialTheme .colorScheme.onTertiaryContainer
91- StatusLevel .NORMAL -> MaterialTheme .colorScheme.primaryContainer to MaterialTheme .colorScheme.onPrimaryContainer
90+ StatusLevel .CRITICAL -> MaterialTheme .colorScheme.errorContainer to MaterialTheme .colorScheme.onErrorContainer
91+ StatusLevel .WARNING -> MaterialTheme .colorScheme.tertiaryContainer to MaterialTheme .colorScheme.onTertiaryContainer
92+ StatusLevel .NORMAL -> MaterialTheme .colorScheme.primaryContainer to MaterialTheme .colorScheme.onPrimaryContainer
9293 StatusLevel .UNSPECIFIED ,
93- null -> MaterialTheme .colorScheme.surfaceContainerHigh to MaterialTheme .colorScheme.onSurface
94+ null -> MaterialTheme .colorScheme.surfaceContainerHigh to MaterialTheme .colorScheme.onSurface
9495 }
9596
9697 Surface (
@@ -181,7 +182,8 @@ private fun ActionButtons(actions: List<PumpAction>) {
181182 FilledTonalButton (
182183 onClick = action.onClick,
183184 enabled = action.enabled,
184- modifier = Modifier .weight(1f )
185+ modifier = Modifier .weight(1f ),
186+ contentPadding = PaddingValues (horizontal = 12 .dp, vertical = 8 .dp)
185187 ) {
186188 if (action.icon != null ) {
187189 Icon (
@@ -197,8 +199,8 @@ private fun ActionButtons(actions: List<PumpAction>) {
197199 modifier = Modifier .size(18 .dp)
198200 )
199201 }
200- Spacer (modifier = Modifier .size(8 .dp))
201- Text (text = action.label)
202+ Spacer (modifier = Modifier .size(4 .dp))
203+ Text (text = action.label, maxLines = 1 )
202204 }
203205 }
204206 if (row.size == 1 ) {
0 commit comments