Timeline captions read as sentences again
Browse files at this commit- style
- timeline captions read as sentences again
1 changed file +20 -25
- crates/app/src/ui/timeline.rs +20 -25
crates/app/src/ui/timeline.rsmodified+20 -25
| @@ -1579,13 +1579,14 @@ impl Player { | ||
| 1579 | 1579 | } else { |
| 1580 | 1580 | FG_SECONDARY() |
| 1581 | 1581 | })) |
| 1582 | - // The captions' own colour, dimmed on a lane whose | |
| 1583 | - // eye is shut: what is not being drawn over the | |
| 1584 | - // picture is still on the lane, and says so. Marked, | |
| 1585 | - // it takes the selection's colours instead, the same | |
| 1582 | + // A letterbox ground rather than the captions' own | |
| 1583 | + // colour: the box itself is where a sentence starts | |
| 1584 | + // and ends on the bed, and that is drawn by the cue | |
| 1585 | + // blocks below, not by the box's own fill. Marked, | |
| 1586 | + // it still takes the selection's colour, the same | |
| 1586 | 1587 | // pair a marked clip takes -- what Delete will act |
| 1587 | 1588 | // on has one look on this bed and not two. |
| 1588 | - .bg(rgb(if on { BG_SELECTED() } else { CLIP_TEXT() })) | |
| 1589 | + .bg(rgb(if on { BG_SELECTED() } else { BG_PANEL() })) | |
| 1589 | 1590 | .when(!shown, |d| d.opacity(0.55)) |
| 1590 | 1591 | .cursor_pointer() |
| 1591 | 1592 | .hover(|s| s.border_color(rgb(ACCENT_PRIMARY()))) |
| @@ -1712,20 +1713,12 @@ impl Player { | ||
| 1712 | 1713 | zone |
| 1713 | 1714 | }), |
| 1714 | 1715 | ) |
| 1715 | - .when_some(label.filter(|_| show_label(vis_w)), |d, label| { | |
| 1716 | - d.child( | |
| 1717 | - div() | |
| 1718 | - .absolute() | |
| 1719 | - .top_0() | |
| 1720 | - .left(px(vis_x)) | |
| 1721 | - .w(px(vis_w)) | |
| 1722 | - .h(px(LABEL_H)) | |
| 1723 | - .px(px(4.)) | |
| 1724 | - .truncate() | |
| 1725 | - .text_size(px(10.)) | |
| 1726 | - .child(label), | |
| 1727 | - ) | |
| 1728 | - }) | |
| 1716 | + // No name drawn on the box itself: the cue blocks | |
| 1717 | + // now fill its full height, and a label sitting | |
| 1718 | + // over them fights the very thing this box exists | |
| 1719 | + // to show. The tooltip still carries the words | |
| 1720 | + // (`sub_tip`), and the ghost while dragging still | |
| 1721 | + // names the track (`ghost`, above). | |
| 1729 | 1722 | // The way back off the lane is the way every other |
| 1730 | 1723 | // box takes: the Delete stroke on the marked caption |
| 1731 | 1724 | // and the Delete row of its own menu |
| @@ -1736,20 +1729,22 @@ impl Player { | ||
| 1736 | 1729 | // caption did not have. |
| 1737 | 1730 | })) |
| 1738 | 1731 | // ...and where the words actually are inside those boxes: |
| 1739 | - // the cues this lane shows on *this* timeline, in a band | |
| 1740 | - // along the bottom of the row. A placement is a window of a | |
| 1732 | + // the cues this lane shows on *this* timeline, each its own | |
| 1733 | + // full-height block over the letterbox ground, inset a | |
| 1734 | + // pixel so the gap between two sentences is visible even | |
| 1735 | + // when they sit back to back. A placement is a window of a | |
| 1741 | 1736 | // track, so a box is not full of speech -- and a lane whose |
| 1742 | 1737 | // marks are all in its first half is a caption dragged too |
| 1743 | - // far, which is exactly what this band shows. | |
| 1738 | + // far, which is exactly what this shows. | |
| 1744 | 1739 | .children(cues.into_iter().map(|(left, width)| { |
| 1745 | 1740 | div() |
| 1746 | 1741 | .absolute() |
| 1747 | - .bottom_0() | |
| 1748 | - .h(px(4.)) | |
| 1742 | + .top(px(1.)) | |
| 1743 | + .bottom(px(1.)) | |
| 1749 | 1744 | .left(px(left)) |
| 1750 | 1745 | .w(px(width)) |
| 1751 | 1746 | .rounded(px(2.)) |
| 1752 | - .bg(rgb(BG_SELECTED())) | |
| 1747 | + .bg(rgb(CLIP_TEXT())) | |
| 1753 | 1748 | })) |
| 1754 | 1749 | // What the silence card found, over the clips it found them |
| 1755 | 1750 | // in and over the waveform band that shows why: on the lane |