ui: unhighlight between marks; translucent clip label
- ::active-annotations no longer falls back to the nearest annotation, so when the playhead is outside every mark nothing is highlighted. - clip label background is translucent (color-mix paper 70%) like the lane bars, so the thumbnail reads through while text stays legible. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d877655b7a
commit
28aa2622f6
2 changed files with 10 additions and 12 deletions
|
|
@ -370,13 +370,13 @@ html.dark .timeline-head {
|
|||
background-size: cover; background-position: center;
|
||||
opacity: 1;
|
||||
}
|
||||
/* a solid label chip pinned top-left — readable over any thumbnail (the old
|
||||
black-text-with-white-halo muddied over busy frames), shrinks to its text so
|
||||
the rest of the thumbnail stays visible. */
|
||||
/* a label chip pinned top-left — translucent like the annotation lane bars so
|
||||
the thumbnail still reads through, but a solid-enough paper wash keeps the
|
||||
text legible (the old black-text-with-white-halo muddied over busy frames). */
|
||||
.clip-name {
|
||||
position: absolute; top: 0; left: 0; z-index: 1; max-width: 100%;
|
||||
box-sizing: border-box; padding: 0 4px; line-height: 1.5;
|
||||
background: var(--paper); color: var(--ink);
|
||||
background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink);
|
||||
border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
text-shadow: none;
|
||||
|
|
|
|||
|
|
@ -108,13 +108,11 @@
|
|||
(first anns)))))
|
||||
|
||||
;; every annotation the playhead is currently inside (overlapping marks ⇒ more
|
||||
;; than one). Falls back to the single ::active-annotation when between marks so
|
||||
;; there's always one highlighted.
|
||||
;; than one; none ⇒ empty set, so nothing is highlighted between marks).
|
||||
(rf/reg-sub
|
||||
::active-annotations
|
||||
:<- [::annotations] :<- [::playhead] :<- [::active-annotation]
|
||||
(fn [[anns ph fallback] _]
|
||||
(let [inside (into #{} (keep (fn [a] (when (some (fn [[lo hi]] (<= lo ph hi)) (:bars a))
|
||||
(:id a)))
|
||||
anns))]
|
||||
(if (seq inside) inside (when fallback #{fallback})))))
|
||||
:<- [::annotations] :<- [::playhead]
|
||||
(fn [[anns ph] _]
|
||||
(into #{} (keep (fn [a] (when (some (fn [[lo hi]] (<= lo ph hi)) (:bars a))
|
||||
(:id a)))
|
||||
anns))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue