Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 182fcc98 authored by Anton Potapov's avatar Anton Potapov
Browse files

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
parent 3cf28edc
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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,
                        )
                    }
                    },
                )
            }
        }