Watching panel: a little wider, long track names end in an ellipsis
Paul's photo showed 'Commentary by director Nancy...' cut off at the panel's edge. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ internal fun TrackPanel(rows: List<TrackRow>, cursor: Int, modifier: Modifier =
|
||||
val corner = RoundedCornerShape(8.dp)
|
||||
// Subtitles, sound and the sleep timer can be more than the screen holds, so it shows a stretch around the cursor.
|
||||
val first = (cursor - maxRows / 2).coerceIn(0, (rows.size - maxRows).coerceAtLeast(0))
|
||||
Column(modifier.width(300.dp).background(Deep.copy(alpha = .96f), corner).border(1.dp, Blue, corner).padding(10.dp), verticalArrangement = Arrangement.spacedBy(3.dp)) {
|
||||
Column(modifier.width(340.dp).background(Deep.copy(alpha = .96f), corner).border(1.dp, Blue, corner).padding(10.dp), verticalArrangement = Arrangement.spacedBy(3.dp)) {
|
||||
if (first > 0) Text("▲ more", color = Muted, fontSize = 11.sp, modifier = Modifier.padding(start = 8.dp))
|
||||
rows.forEachIndexed { index, row ->
|
||||
if (index < first || index >= first + maxRows) return@forEachIndexed
|
||||
@@ -106,7 +106,8 @@ internal fun TrackPanel(rows: List<TrackRow>, cursor: Int, modifier: Modifier =
|
||||
}
|
||||
val on = index == cursor
|
||||
Text((if (row.selected) "✓ " else " ") + row.label, Modifier.fillMaxWidth().background(if (on) Yellow else Color.Transparent, RoundedCornerShape(6.dp)).padding(horizontal = 10.dp, vertical = 4.dp),
|
||||
color = if (on) OnAccent else Ink, fontSize = 15.sp, fontWeight = if (on || row.selected) FontWeight.SemiBold else FontWeight.Normal, maxLines = 1)
|
||||
color = if (on) OnAccent else Ink, fontSize = 15.sp, fontWeight = if (on || row.selected) FontWeight.SemiBold else FontWeight.Normal, maxLines = 1,
|
||||
overflow = androidx.compose.ui.text.style.TextOverflow.Ellipsis)
|
||||
}
|
||||
if (first + maxRows < rows.size) Text("▼ more", color = Muted, fontSize = 11.sp, modifier = Modifier.padding(start = 8.dp))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user