summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Anton Potapov <apotapov@google.com> 2025-01-16 16:07:23 +0000
committer Anton Potapov <apotapov@google.com> 2025-01-16 16:14:34 +0000
commit182fcc982976f044bf92f3de0c4e71a06361838c (patch)
treefed12fee318c0e8662e48a8924c90e8f53c64d2d
parent3cf28edcf2ad87d4d819becbc3b384241fe8ed18 (diff)
Make text in the spatial audio popup ellipsize instead of marquee
This makes this popup consistent with the ANC one Flag: EXEMPT BUGFIX Test: manual on the phone. Connect a compatible headset, increase the display scale and text size to a maximum and observe Fixes: 380389962 Change-Id: I66f67ce544945968edb589a1b207a363ba485ffa
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt b/packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt
index 3295dde55238..bcd4d925814b 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt
@@ -28,6 +28,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.text.style.TextOverflow
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.internal.logging.UiEventLogger
import com.android.systemui.animation.Expandable
@@ -54,7 +55,7 @@ constructor(
VolumePanelUiEvent.VOLUME_PANEL_SPATIAL_AUDIO_POP_UP_SHOWN,
0,
null,
- viewModel.spatialAudioButtons.value.indexOfFirst { it.button.isActive }
+ viewModel.spatialAudioButtons.value.indexOfFirst { it.button.isActive },
)
val gravity = horizontalGravity or Gravity.BOTTOM
volumePanelPopup.show(expandable, gravity, { Title() }, { Content(it) })
@@ -95,14 +96,14 @@ constructor(
icon = { Icon(icon = buttonViewModel.button.icon) },
label = {
Text(
- modifier = Modifier.basicMarquee(),
text = label,
style = MaterialTheme.typography.labelMedium,
color = LocalContentColor.current,
textAlign = TextAlign.Center,
- maxLines = 2
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis,
)
- }
+ },
)
}
}