@@ -9,7 +9,7 @@ import androidx.compose.foundation.layout.fillMaxSize
99import androidx.compose.foundation.layout.fillMaxWidth
1010import androidx.compose.foundation.layout.padding
1111import androidx.compose.foundation.layout.size
12- import androidx.compose.foundation.shape.RoundedCornerShape
12+ import androidx.compose.foundation.layout.wrapContentWidth
1313import androidx.compose.material.Checkbox
1414import androidx.compose.material.DropdownMenu
1515import androidx.compose.material.DropdownMenuItem
@@ -42,6 +42,7 @@ import androidx.compose.ui.Alignment
4242import androidx.compose.ui.Modifier
4343import androidx.compose.ui.platform.LocalConfiguration
4444import androidx.compose.ui.res.stringResource
45+ import androidx.compose.ui.text.style.TextOverflow
4546import androidx.compose.ui.tooling.preview.Preview
4647import androidx.compose.ui.unit.Dp
4748import androidx.compose.ui.unit.dp
@@ -369,11 +370,22 @@ private fun TrackInfo(
369370 .fillMaxWidth(),
370371 horizontalArrangement = Arrangement .SpaceBetween
371372) {
372- Column {
373- Text (text = playingTrack.title, style = MaterialTheme .typography.h6)
374- Text (text = playingTrack.artistInfo(), style = MaterialTheme .typography.subtitle2)
373+ Column (modifier = Modifier .weight(1f )) {
374+ Text (
375+ text = playingTrack.title,
376+ style = MaterialTheme .typography.h6,
377+ maxLines = 1 ,
378+ overflow = TextOverflow .Ellipsis
379+ )
380+ Text (
381+ text = playingTrack.artistInfo(),
382+ style = MaterialTheme .typography.subtitle2,
383+ color = MaterialTheme .colors.onSurface.copy(0.7f ),
384+ maxLines = 1 ,
385+ overflow = TextOverflow .Ellipsis
386+ )
375387 }
376- Column {
388+ Column (modifier = Modifier .wrapContentWidth().padding(start = 8 .dp)) {
377389 VolumeControl ()
378390 }
379391}
0 commit comments