Menu styling, source removal with clips, settings chords, spine geography
Browse files at this commit3e04aeb73731b9023b14616a86c3f5cf3cf6d156Parent: 83b80db- feat
- menu styling, source removal with clips, settings chords, spine geography
16 changed files +775 -304
- crates/app/src/interact.rs +31 -0
- crates/app/src/menus.rs +16 -1
- crates/app/src/oracle.rs +13 -3
- crates/app/src/player/actions.rs +4 -0
- crates/app/src/player/library.rs +84 -0
- crates/app/src/player/view.rs +6 -4
- crates/app/src/tests/editing.rs +16 -0
- crates/app/src/tests/layout.rs +61 -1
- crates/app/src/ui/cards.rs +200 -122
- crates/app/src/ui/dock_stance.rs +40 -0
- crates/app/src/ui/library.rs +14 -11
- crates/app/src/ui/overlays.rs +55 -35
- crates/app/src/ui/settings_stance.rs +139 -21
- crates/app/src/ui/spine_stance.rs +59 -96
- crates/app/src/ui/stance.rs +19 -6
- crates/app/src/ui/theme.rs +18 -4
crates/app/src/interact.rsmodified+31 -0
| @@ -185,6 +185,37 @@ pub(crate) fn scrim() -> Div { | ||
| 185 | 185 | div().absolute().inset_0().occlude() |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | +/// The body every hanging menu is drawn on: the clip menu, the library row | |
| 189 | +/// menu and the open choice list, one shape for all three. | |
| 190 | +/// | |
| 191 | +/// It exists because the three drifted: each carried its own copy of the | |
| 192 | +/// plate chrome, so styling one (the picker, 2026-08-21) left the other two | |
| 193 | +/// painting the legacy raised grey -- the user's "right click menu in library | |
| 194 | +/// is old too". A plate is `panel` with a seam around it and a 6px radius | |
| 195 | +/// (DESIGN §2/§4); the legacy tree keeps its own raised sheet. One function, | |
| 196 | +/// so the next change reaches all three or none. | |
| 197 | +pub(crate) fn menu_plate(id: &'static str, x: f32, y: f32, darkroom: bool) -> Stateful<Div> { | |
| 198 | + div() | |
| 199 | + .id(id) | |
| 200 | + .absolute() | |
| 201 | + .left(px(x)) | |
| 202 | + .top(px(y)) | |
| 203 | + .w(px(crate::layout::MENU_W)) | |
| 204 | + .flex() | |
| 205 | + .flex_col() | |
| 206 | + .p(px(crate::layout::MENU_PAD)) | |
| 207 | + .rounded(px(6.)) | |
| 208 | + .bg(rgb(if darkroom { | |
| 209 | + crate::ui::theme::DARK_PANEL() | |
| 210 | + } else { | |
| 211 | + crate::ui::theme::BG_RAISED() | |
| 212 | + })) | |
| 213 | + .when(darkroom, |d| { | |
| 214 | + d.border_1() | |
| 215 | + .border_color(rgba(crate::ui::theme::DARK_SEAM())) | |
| 216 | + }) | |
| 217 | +} | |
| 218 | + | |
| 188 | 219 | /// The sheet a card with a *slider* in it takes instead: the same scrim, with |
| 189 | 220 | /// the window's own drag listeners on it as well. |
| 190 | 221 | /// |
crates/app/src/menus.rsmodified+16 -1
| @@ -116,13 +116,21 @@ pub(crate) type ChoiceRow = (Choice, SharedString, SharedString, bool); | ||
| 116 | 116 | pub(crate) enum RowItem { |
| 117 | 117 | Add, |
| 118 | 118 | Remove, |
| 119 | + /// Remove that first deletes every clip playing the row. The plain | |
| 120 | + /// [`RowItem::Remove`] is refused while any clip plays a source (the | |
| 121 | + /// engine's own rule), which used to leave a placed source with no way | |
| 122 | + /// out of the library at all -- this is that way out, and it is | |
| 123 | + /// destructive, so it is listed only when it is the one that applies and | |
| 124 | + /// it says how many clips it takes with it. | |
| 125 | + RemoveWithClips, | |
| 119 | 126 | Reveal, |
| 120 | 127 | Properties, |
| 121 | 128 | } |
| 122 | 129 | |
| 123 | -pub(crate) const ROW_ITEMS: [RowItem; 4] = [ | |
| 130 | +pub(crate) const ROW_ITEMS: [RowItem; 5] = [ | |
| 124 | 131 | RowItem::Add, |
| 125 | 132 | RowItem::Remove, |
| 133 | + RowItem::RemoveWithClips, | |
| 126 | 134 | RowItem::Reveal, |
| 127 | 135 | RowItem::Properties, |
| 128 | 136 | ]; |
| @@ -132,6 +140,12 @@ impl RowItem { | ||
| 132 | 140 | match self { |
| 133 | 141 | Self::Add => "Add at playhead", |
| 134 | 142 | Self::Remove => "Remove from library", |
| 143 | + // Same label as the plain remove: only ever one of the two is on | |
| 144 | + // the plate (the oracle hides the other), so what differs is the | |
| 145 | + // consequence, and the consequence belongs in the hint column | |
| 146 | + // where every other row states its own. The long dashed title | |
| 147 | + // truncated its own hint at `MENU_W`. | |
| 148 | + Self::RemoveWithClips => "Remove from library", | |
| 135 | 149 | Self::Reveal => "Reveal in files", |
| 136 | 150 | Self::Properties => "Properties", |
| 137 | 151 | } |
| @@ -146,6 +160,7 @@ impl RowItem { | ||
| 146 | 160 | // off mid-word says less than a shorter one. |
| 147 | 161 | Self::Add => "the whole file", |
| 148 | 162 | Self::Remove => "nothing plays it", |
| 163 | + Self::RemoveWithClips => "clips too", | |
| 149 | 164 | Self::Reveal => "file manager", |
| 150 | 165 | Self::Properties => "…", |
| 151 | 166 | } |
crates/app/src/oracle.rsmodified+13 -3
| @@ -373,12 +373,22 @@ pub(crate) fn row_enable(item: RowItem, ctx: RowCtx) -> Enable { | ||
| 373 | 373 | match item { |
| 374 | 374 | // The two that change the timeline, so an export reading it stops them |
| 375 | 375 | // both -- the key handler's rule, applied to a menu. |
| 376 | - RowItem::Add | RowItem::Remove if ctx.exporting => Enable::No("an export is running"), | |
| 377 | - RowItem::Add | RowItem::Remove if !ctx.timeline => Enable::No("no timeline open"), | |
| 376 | + RowItem::Add | RowItem::Remove | RowItem::RemoveWithClips if ctx.exporting => { | |
| 377 | + Enable::No("an export is running") | |
| 378 | + } | |
| 379 | + RowItem::Add | RowItem::Remove | RowItem::RemoveWithClips if !ctx.timeline => { | |
| 380 | + Enable::No("no timeline open") | |
| 381 | + } | |
| 378 | 382 | // Dimmed and saying why rather than clicked and refused afterwards: the |
| 379 | 383 | // row's own grey already says the file cannot join this timeline. |
| 380 | 384 | RowItem::Add if !ctx.usable => Enable::No("it cannot join this one"), |
| 381 | - RowItem::Remove if ctx.placed > 0 => Enable::No("clips play it"), | |
| 385 | + // The two removes are one verb with two shapes, and exactly one of | |
| 386 | + // them is ever on the plate: the plain one while nothing plays the | |
| 387 | + // source, the clips-too one while something does. Hidden rather than | |
| 388 | + // dimmed, because a dimmed "Remove" sitting above a live "Remove — | |
| 389 | + // with its clips" is two rows arguing about the same act. | |
| 390 | + RowItem::Remove if ctx.placed > 0 => Enable::Hidden("clips play it"), | |
| 391 | + RowItem::RemoveWithClips if ctx.placed == 0 => Enable::Hidden("nothing plays it"), | |
| 382 | 392 | // Neither of these touches the timeline: a file can be found on disk and |
| 383 | 393 | // described whatever the editor is doing, with no timeline at all. |
| 384 | 394 | _ => Enable::Yes, |
crates/app/src/player/actions.rsmodified+4 -0
| @@ -429,6 +429,10 @@ impl Player { | ||
| 429 | 429 | self.library_menu = None; |
| 430 | 430 | self.remove_source(&menu.path, menu.stream, cx); |
| 431 | 431 | } |
| 432 | + RowItem::RemoveWithClips => { | |
| 433 | + self.library_menu = None; | |
| 434 | + self.remove_source_and_clips(&menu.path, menu.stream, cx); | |
| 435 | + } | |
| 432 | 436 | RowItem::Reveal => { |
| 433 | 437 | self.library_menu = None; |
| 434 | 438 | // Another process starting: off the UI thread, exactly as the |
crates/app/src/player/library.rsmodified+84 -0
| @@ -199,6 +199,90 @@ impl Player { | ||
| 199 | 199 | cx.notify(); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | + /// Removes a library row *and* every clip playing it, in that order -- | |
| 203 | + /// the plain [`Player::remove_source`] is refused by the engine while any | |
| 204 | + /// clip still plays a source, which left a placed file with no reachable | |
| 205 | + /// way out of the library at all (user 2026-08-21: "can not remove a | |
| 206 | + /// media from library"). Destructive, and named so on the plate it is | |
| 207 | + /// picked from; one undo entry per deleted clip, exactly as deleting them | |
| 208 | + /// by hand would leave, and then the source itself goes the same door | |
| 209 | + /// every other removal takes. | |
| 210 | + pub(crate) fn remove_source_and_clips( | |
| 211 | + &mut self, | |
| 212 | + path: &Path, | |
| 213 | + stream: usize, | |
| 214 | + cx: &mut Context<Self>, | |
| 215 | + ) { | |
| 216 | + if self.exporting().is_some() { | |
| 217 | + return; | |
| 218 | + } | |
| 219 | + let Some(session) = self.session.as_mut() else { | |
| 220 | + self.notify_user("NO TIMELINE — open a file first".into()); | |
| 221 | + return; | |
| 222 | + }; | |
| 223 | + let Some(idx) = session | |
| 224 | + .sources() | |
| 225 | + .iter() | |
| 226 | + .position(|s| s.path == path && s.audio_stream == stream) | |
| 227 | + else { | |
| 228 | + return; | |
| 229 | + }; | |
| 230 | + // One clip at a time, re-scanning after each: deleting a clip takes | |
| 231 | + // its group partners (a V1 picture and its A1 sound) with it, so a | |
| 232 | + // list of indices collected up front goes stale the moment the first | |
| 233 | + // one lands -- and a stale index deletes some other film's clip. | |
| 234 | + // Bounded by the count that was there when we started, so a | |
| 235 | + // `delete_clip` that ever answers false cannot spin here. | |
| 236 | + let count_of = |session: &engine::PlaybackSession| { | |
| 237 | + session | |
| 238 | + .lanes() | |
| 239 | + .into_iter() | |
| 240 | + .flat_map(|lane| session.lane_clips(lane)) | |
| 241 | + .filter(|c| c.source == idx) | |
| 242 | + .count() | |
| 243 | + }; | |
| 244 | + let started_with = count_of(session); | |
| 245 | + let mut budget = session | |
| 246 | + .lanes() | |
| 247 | + .into_iter() | |
| 248 | + .flat_map(|lane| session.lane_clips(lane)) | |
| 249 | + .filter(|c| c.source == idx) | |
| 250 | + .count(); | |
| 251 | + while budget > 0 { | |
| 252 | + let Some((lane, at)) = session.lanes().into_iter().find_map(|lane| { | |
| 253 | + session | |
| 254 | + .lane_clips(lane) | |
| 255 | + .iter() | |
| 256 | + .position(|c| c.source == idx) | |
| 257 | + .map(|at| (lane, at)) | |
| 258 | + }) else { | |
| 259 | + break; | |
| 260 | + }; | |
| 261 | + if !session.delete_clip(lane, at) { | |
| 262 | + break; | |
| 263 | + } | |
| 264 | + budget -= 1; | |
| 265 | + } | |
| 266 | + // What actually left the bench, not how many calls it took: one | |
| 267 | + // `delete_clip` on a grouped clip takes its partner with it. | |
| 268 | + let deleted = started_with.saturating_sub(count_of(session)); | |
| 269 | + self.reset_after_reseek(); | |
| 270 | + self.remove_source(path, stream, cx); | |
| 271 | + // `remove_source` already wrote its own line; this one says what went | |
| 272 | + // with it, which is the half that line cannot know about. | |
| 273 | + if deleted > 0 { | |
| 274 | + self.notify_user( | |
| 275 | + format!( | |
| 276 | + "{deleted} clip{} deleted with {}", | |
| 277 | + if deleted == 1 { "" } else { "s" }, | |
| 278 | + file_name(path) | |
| 279 | + ) | |
| 280 | + .into(), | |
| 281 | + ); | |
| 282 | + } | |
| 283 | + cx.notify(); | |
| 284 | + } | |
| 285 | + | |
| 202 | 286 | /// Back to the window the editor launches as: no timeline, no library, no |
| 203 | 287 | /// picture -- and the hint that says to open a file. What removing the last |
| 204 | 288 | /// library row leaves, since a session whose library is empty has nothing |
crates/app/src/player/view.rsmodified+6 -4
| @@ -405,10 +405,12 @@ impl Player { | ||
| 405 | 405 | let anchor = px_along(event.position.x, self.ruler.get()); |
| 406 | 406 | self.zoom(factor, Some(anchor), cx); |
| 407 | 407 | } |
| 408 | - // Up runs forward along the film. A page's wheel-up goes back | |
| 409 | - // toward its top, but a timeline is not a page: the wheel pushes | |
| 410 | - // the film past the playhead, so up is later. (User, 2026-08-21.) | |
| 411 | - false => self.scroll_view(d.signum(), cx), | |
| 408 | + // Up is back towards the head of the timeline, the way a wheel up | |
| 409 | + // is back towards the top of a page -- and wheel DOWN runs the | |
| 410 | + // film forward. Flipped to "up is later" earlier on 2026-08-21 and | |
| 411 | + // reverted the same day: the user drove it and wanted the page | |
| 412 | + // reading back. | |
| 413 | + false => self.scroll_view(-d.signum(), cx), | |
| 412 | 414 | } |
| 413 | 415 | } |
| 414 | 416 | } |
crates/app/src/tests/editing.rsmodified+16 -0
| @@ -1082,6 +1082,22 @@ fn a_menu_offers_only_what_applies_and_is_drawn_inside_the_window() { | ||
| 1082 | 1082 | "a file that cannot join this timeline is not an Add anybody can ask for" |
| 1083 | 1083 | ); |
| 1084 | 1084 | assert!(!row_enable(RowItem::Remove, RowCtx { placed: 1, ..live }).yes()); |
| 1085 | + // The two removes are one verb with two shapes and exactly one of them is | |
| 1086 | + // ever on the plate: a placed source offers "with its clips", an unplaced | |
| 1087 | + // one the plain remove. Before this pair existed a placed source had no | |
| 1088 | + // reachable way out of the library at all (user 2026-08-21: "can not | |
| 1089 | + // remove a media from library"). | |
| 1090 | + let placed = RowCtx { placed: 2, ..live }; | |
| 1091 | + let items = row_items(placed); | |
| 1092 | + assert!(items.contains(&RowItem::RemoveWithClips) && !items.contains(&RowItem::Remove)); | |
| 1093 | + assert!(row_enable(RowItem::RemoveWithClips, placed).yes()); | |
| 1094 | + let unplaced = row_items(live); | |
| 1095 | + assert!(unplaced.contains(&RowItem::Remove) && !unplaced.contains(&RowItem::RemoveWithClips)); | |
| 1096 | + assert!(!row_enable( | |
| 1097 | + RowItem::RemoveWithClips, | |
| 1098 | + RowCtx { exporting: true, ..placed } | |
| 1099 | + ) | |
| 1100 | + .yes()); | |
| 1085 | 1101 | assert!(!row_enable(RowItem::Add, RowCtx::default()).yes()); |
| 1086 | 1102 | // Every refusal is short enough to sit in the hint column beside its |
| 1087 | 1103 | // label, the clip menu's rule. |
crates/app/src/tests/layout.rsmodified+61 -1
| @@ -44,6 +44,54 @@ fn toolbar_fits_the_smallest_window() { | ||
| 44 | 44 | ); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | +/// The class the user reported twice in one day ("some menus are belongs to | |
| 48 | +/// old ui ... for example resolution picker", then "right click menu in | |
| 49 | +/// library is old too"): a surface that paints a *role* token | |
| 50 | +/// (`BG_HOVER`/`BG_SELECTED`/`BG_RAISED`) rather than a Darkroom token used | |
| 51 | +/// to get the legacy tree's pale greys, because the Darkroom palette still | |
| 52 | +/// carried them. Dozens of call sites read those three roles; the fix is the | |
| 53 | +/// palette, and this pins it: every interaction grey in the Darkroom palette | |
| 54 | +/// stays inside DESIGN §2's `raised` band (#14171B - #17191D), with only the | |
| 55 | +/// picked-row fill allowed one step past it, and each stays distinguishable | |
| 56 | +/// from the one below it so a hover is still visible on a resting row. | |
| 57 | +#[test] | |
| 58 | +fn the_darkroom_palettes_interaction_greys_stay_inside_the_raised_band() { | |
| 59 | + use crate::ui::theme::darkroom; | |
| 60 | + let grey = |v: u32| (v >> 16 & 0xff, v >> 8 & 0xff, v & 0xff); | |
| 61 | + let lum = |v: u32| { | |
| 62 | + let (r, g, b) = grey(v); | |
| 63 | + u32::from(r) + u32::from(g) + u32::from(b) | |
| 64 | + }; | |
| 65 | + let band_low = lum(0x14171b); | |
| 66 | + let band_high = lum(0x17191d); | |
| 67 | + for (name, value) in [ | |
| 68 | + ("BG_RAISED", darkroom::BG_RAISED), | |
| 69 | + ("BG_HOVER", darkroom::BG_HOVER), | |
| 70 | + ] { | |
| 71 | + assert!( | |
| 72 | + (band_low..=band_high).contains(&lum(value)), | |
| 73 | + "darkroom::{name} = {value:#08x} is outside DESIGN §2's raised band \ | |
| 74 | + -- every menu, card and row that paints this role would open a \ | |
| 75 | + pale plate in a dim room" | |
| 76 | + ); | |
| 77 | + } | |
| 78 | + assert!( | |
| 79 | + lum(darkroom::BG_SELECTED) > lum(darkroom::BG_HOVER) | |
| 80 | + && lum(darkroom::BG_SELECTED) <= lum(0x1c1f24), | |
| 81 | + "the picked-row fill is one step past hover at most; the real mark is \ | |
| 82 | + the 1px ink1 ring (DESIGN §4)" | |
| 83 | + ); | |
| 84 | + assert!( | |
| 85 | + lum(darkroom::BG_HOVER) > lum(darkroom::BG_RAISED), | |
| 86 | + "hover must be a step ABOVE the resting raised fill or a hovered row \ | |
| 87 | + cannot be seen at all" | |
| 88 | + ); | |
| 89 | + assert!( | |
| 90 | + lum(darkroom::BG_HOVER_DIM) < lum(darkroom::BG_RAISED), | |
| 91 | + "the dim hover is the step below, not above" | |
| 92 | + ); | |
| 93 | +} | |
| 94 | + | |
| 47 | 95 | /// The whole reason `ui/theme.rs` exists: a colour written anywhere else is |
| 48 | 96 | /// a colour the next palette sweep will miss, which is exactly how 186 grey |
| 49 | 97 | /// calls survived every previous attempt at this. |
| @@ -2222,13 +2270,25 @@ fn settings_project_and_editor_sections_open_disjoint_doors() { | ||
| 2222 | 2270 | let project_body = &source[project_start..editor_start]; |
| 2223 | 2271 | let editor_body = &source[editor_start..render_start]; |
| 2224 | 2272 | |
| 2273 | + // `Pick::Theme` is the one list that is nobody's project -- the palette | |
| 2274 | + // lives in ~/.config/edith like the subtitle font beside it (see | |
| 2275 | + // `menus.rs`'s own note on the variant), so its row is EDITOR's by the | |
| 2276 | + // same rule every other row here follows. The scan below is on the door | |
| 2277 | + // *string*, so the palette row is subtracted from the EDITOR body before | |
| 2278 | + // the project-door check runs rather than the check being loosened for | |
| 2279 | + // every picker. | |
| 2280 | + let editor_no_theme = editor_body.replace("open_picker(Pick::Theme", ""); | |
| 2225 | 2281 | for door in ["open_picker(", "open_mix("] { |
| 2226 | 2282 | assert!(project_body.contains(door), "PROJECT section no longer opens {door} -- update this guard"); |
| 2227 | 2283 | assert!( |
| 2228 | - !editor_body.contains(door), | |
| 2284 | + !editor_no_theme.contains(door), | |
| 2229 | 2285 | "EDITOR section opens {door}, a project-file door -- that value belongs in PROJECT, not here" |
| 2230 | 2286 | ); |
| 2231 | 2287 | } |
| 2288 | + assert!( | |
| 2289 | + editor_body.contains("open_picker(Pick::Theme"), | |
| 2290 | + "the palette row left EDITOR -- it is a ~/.config preference, not a project value" | |
| 2291 | + ); | |
| 2232 | 2292 | for door in ["toggle_proxies(", "toggle_auto_proxies(", "open_subtitle_style("] { |
| 2233 | 2293 | assert!(editor_body.contains(door), "EDITOR section no longer opens {door} -- update this guard"); |
| 2234 | 2294 | assert!( |
crates/app/src/ui/cards.rsmodified+200 -122
| @@ -335,10 +335,30 @@ impl Player { | ||
| 335 | 335 | // The small print of a picked row sits on the highlight, where the |
| 336 | 336 | // dim ink is only 3.3:1 -- the row it lands on lifts it (WCAG |
| 337 | 337 | // 1.4.3, and the fit test pins both numbers). |
| 338 | - let ink = match picked { | |
| 339 | - true => ink_primary, | |
| 340 | - false => ink_secondary, | |
| 338 | + // DESIGN §2's ink ladder, applied to a row rather than to a | |
| 339 | + // whole card (user 2026-08-21: the export card's "colors are not | |
| 340 | + // aligning a little so hard to read"). Two faults it fixes: the | |
| 341 | + // detail of a picked row was drawn BRIGHTER than the label it | |
| 342 | + // belongs to -- the loudest thing on the row was its small print | |
| 343 | + // -- and the resting rows' detail sat at `ink3` on `panel`, the | |
| 344 | + // metadata step, for text that is the row's actual content and | |
| 345 | + // has to be read at a glance. Label leads its row (`ink1` | |
| 346 | + // picked, `ink2` resting), detail follows one step behind | |
| 347 | + // (`ink2` picked, `ink2` resting -- never `ink3`, which stays | |
| 348 | + // for the key column and the summary's small print). | |
| 349 | + let ink = match (dark, picked) { | |
| 350 | + (true, true) => INK2(), | |
| 351 | + (true, false) => INK2(), | |
| 352 | + (false, true) => ink_primary, | |
| 353 | + (false, false) => ink_secondary, | |
| 341 | 354 | }; |
| 355 | + let label_ink = match (dark, picked) { | |
| 356 | + (true, true) => INK1(), | |
| 357 | + (true, false) => INK2(), | |
| 358 | + (false, true) => ink_primary, | |
| 359 | + (false, false) => ink_secondary, | |
| 360 | + }; | |
| 361 | + let key_ink = if dark { INK3() } else { ink_secondary }; | |
| 342 | 362 | live(row(id), enabled) |
| 343 | 363 | .when(picked, |d| d.bg(rgb(bg_selected))) |
| 344 | 364 | .child( |
| @@ -355,14 +375,22 @@ impl Player { | ||
| 355 | 375 | div() |
| 356 | 376 | .w(px(EXPORT_KEY_W)) |
| 357 | 377 | .text_size(px(11.)) |
| 358 | - .text_color(rgb(ink)) | |
| 378 | + .text_color(rgb(key_ink)) | |
| 359 | 379 | .when_some(mono_style.clone(), |d, style| { |
| 360 | 380 | d.font(style.font).text_size(style.size) |
| 361 | 381 | }) |
| 362 | 382 | .child(SharedString::from(key.to_string())), |
| 363 | 383 | ) |
| 364 | 384 | .child( |
| 385 | + // A fixed label column in the darkroom: the | |
| 386 | + // details are the long half and they wrap, so | |
| 387 | + // without one they start at a different x on | |
| 388 | + // every row and a wrapped line reads as if it | |
| 389 | + // began left of the label it belongs to. | |
| 365 | 390 | div() |
| 391 | + .when(dark, |d| { | |
| 392 | + d.w(px(92.)).flex_none().text_color(rgb(label_ink)) | |
| 393 | + }) | |
| 366 | 394 | .when_some(label_style.clone(), |d, style| { |
| 367 | 395 | d.font(style.font).text_size(style.size) |
| 368 | 396 | }) |
| @@ -866,13 +894,13 @@ impl Player { | ||
| 866 | 894 | // off the front pane with the rows they reshape -- so a shut |
| 867 | 895 | // pane advertises `s` instead of a pair of keys with nothing on |
| 868 | 896 | // screen for them to touch. |
| 897 | + // Short enough to read at a glance in the plate's own head row: | |
| 898 | + // the long four-clause sentence was 11px `ink3` mono across the | |
| 899 | + // whole sheet and read as noise above the rows it was meant to | |
| 900 | + // explain (user 2026-08-21: "hard to read"). | |
| 869 | 901 | (None, None) => match self.export_advanced_open { |
| 870 | - true => "the keys are on the rows · enter exports · \ | |
| 871 | - a click away or esc closes · g/r change the layout" | |
| 872 | - .into(), | |
| 873 | - false => "the keys are on the rows · enter exports · \ | |
| 874 | - a click away or esc closes · s for Advanced" | |
| 875 | - .into(), | |
| 902 | + true => "↵ exports · esc closes · g/r layout".into(), | |
| 903 | + false => "↵ exports · esc closes · s Advanced".into(), | |
| 876 | 904 | }, |
| 877 | 905 | }; |
| 878 | 906 | if dark { |
| @@ -885,6 +913,33 @@ impl Player { | ||
| 885 | 913 | // paints nothing (`SCRIM()` is deliberately not applied here) -- |
| 886 | 914 | // an invisible catcher changes zero picture pixels while a |
| 887 | 915 | // dimming one would still tint the screen it must never cover. |
| 916 | + // The plate is the room's below-picture footprint, not a 340px | |
| 917 | + // corner card (user 2026-08-21: "export section is not aligning | |
| 918 | + // with our design"). Measured at 1280x720 the corner card's own | |
| 919 | + // max-height was ~9px taller than the footprint it had to fit | |
| 920 | + // in, so its scrolling row list collapsed to a single visible | |
| 921 | + // row: the presets, Advanced and every codec row under them were | |
| 922 | + // unreachable by pointer, and the long status sentence wrapped to | |
| 923 | + // three lines over the top of them. Two columns instead -- rows | |
| 924 | + // left, what-it-adds-up-to and the one bordered chip right -- | |
| 925 | + // inside the same bench+ledger footprint every menu already | |
| 926 | + // hangs in, so the picture stays uncovered (§11 check 6) and the | |
| 927 | + // list gets the whole height rather than a fraction of it. | |
| 928 | + let floor = crate::ui::stance::below_picture_floor( | |
| 929 | + f32::from(viewport.height), | |
| 930 | + self.split_px(Split::Bench, viewport), | |
| 931 | + ); | |
| 932 | + let summary = |text: SharedString, ink: u32| { | |
| 933 | + div() | |
| 934 | + .flex_none() | |
| 935 | + .px(px(6.)) | |
| 936 | + .type_style(type_scale::mono( | |
| 937 | + type_scale::CHORD_METADATA_MAX_PX, | |
| 938 | + gpui::FontWeight::MEDIUM, | |
| 939 | + )) | |
| 940 | + .text_color(rgb(ink)) | |
| 941 | + .child(text) | |
| 942 | + }; | |
| 888 | 943 | return Some( |
| 889 | 944 | div() |
| 890 | 945 | .id("export-click-catcher") |
| @@ -894,9 +949,14 @@ impl Player { | ||
| 894 | 949 | .left_0() |
| 895 | 950 | .right_0() |
| 896 | 951 | .flex() |
| 897 | - .items_end() | |
| 898 | - .justify_end() | |
| 899 | - .p(px(12.)) | |
| 952 | + // Below the time band, not merely below the picture: the | |
| 953 | + // transport and the Export chip that opened this card are | |
| 954 | + // on that band, and a sheet drawn over them hides the | |
| 955 | + // control the editor just pressed. The bench and the | |
| 956 | + // ledger are what this plate is allowed to cover. | |
| 957 | + .pt(px(floor + crate::ui::stance::TIME_BAND_H + 6.)) | |
| 958 | + .pb(px(6.)) | |
| 959 | + .px(px(6.)) | |
| 900 | 960 | .on_mouse_down( |
| 901 | 961 | MouseButton::Left, |
| 902 | 962 | cx.listener(|this, _: &MouseDownEvent, _, cx| { |
| @@ -908,131 +968,149 @@ impl Player { | ||
| 908 | 968 | .child( |
| 909 | 969 | div() |
| 910 | 970 | .id("export-plate") |
| 911 | - .w(px(EXPORT_W.min(340.))) | |
| 912 | - .max_h(px(4. * KEYS_ROW_H + rows_h + 90.)) | |
| 971 | + .flex_1() | |
| 972 | + .min_w(px(0.)) | |
| 913 | 973 | .on_mouse_down(MouseButton::Left, swallow) |
| 914 | 974 | .flex() |
| 915 | 975 | .flex_col() |
| 916 | - .gap(px(2.)) | |
| 976 | + .gap(px(4.)) | |
| 917 | 977 | .p(px(10.)) |
| 918 | - .rounded(px(6.)) | |
| 978 | + .rounded(px(4.)) | |
| 919 | 979 | .bg(rgb(DARK_PANEL())) |
| 920 | 980 | .border_1() |
| 921 | 981 | .border_color(rgba(DARK_SEAM())) |
| 922 | 982 | .child( |
| 923 | 983 | div() |
| 924 | 984 | .flex_none() |
| 925 | - .px(px(6.)) | |
| 926 | - .type_style(type_scale::head()) | |
| 927 | - .text_color(rgb(INK3())) | |
| 928 | - .child("EXPORT"), | |
| 929 | - ) | |
| 930 | - .child( | |
| 931 | - div() | |
| 932 | - .flex_none() | |
| 933 | - .px(px(6.)) | |
| 934 | - .text_color(rgb(INK3())) | |
| 935 | - .type_style(type_scale::mono( | |
| 936 | - type_scale::CHORD_METADATA_MAX_PX, | |
| 937 | - gpui::FontWeight::MEDIUM, | |
| 938 | - )) | |
| 939 | - .child(status_line), | |
| 940 | - ) | |
| 941 | - .child( | |
| 942 | - div() | |
| 943 | - .id("export-rows") | |
| 944 | 985 | .flex() |
| 945 | - .flex_col() | |
| 946 | - .gap(px(2.)) | |
| 947 | - .max_h(px(rows_h)) | |
| 948 | - .overflow_y_scroll() | |
| 949 | - .children(list), | |
| 950 | - ) | |
| 951 | - .child( | |
| 952 | - div() | |
| 953 | - .flex_none() | |
| 954 | - .px(px(6.)) | |
| 955 | - .type_style(type_scale::mono( | |
| 956 | - type_scale::CHORD_METADATA_MAX_PX, | |
| 957 | - gpui::FontWeight::MEDIUM, | |
| 958 | - )) | |
| 959 | - .text_color(rgb(INK2())) | |
| 960 | - .child(head), | |
| 961 | - ) | |
| 962 | - .children(self.range.map(|(start, end)| { | |
| 963 | - div() | |
| 964 | - .flex_none() | |
| 965 | - .px(px(6.)) | |
| 966 | - .type_style(type_scale::mono( | |
| 967 | - type_scale::CHORD_METADATA_MAX_PX, | |
| 968 | - gpui::FontWeight::MEDIUM, | |
| 969 | - )) | |
| 970 | - .text_color(rgb(INK3())) | |
| 971 | - .child(format!( | |
| 972 | - "RANGE {}\u{2013}{} ({})", | |
| 973 | - timecode(f64::from(start) / self.fps, self.fps), | |
| 974 | - timecode(f64::from(end) / self.fps, self.fps), | |
| 975 | - frames_timecode(end - start, self.fps), | |
| 976 | - )) | |
| 977 | - })) | |
| 978 | - .child( | |
| 979 | - div() | |
| 980 | - .flex_none() | |
| 986 | + .items_baseline() | |
| 987 | + .justify_between() | |
| 988 | + .gap(px(12.)) | |
| 981 | 989 | .px(px(6.)) |
| 982 | - .type_style(type_scale::mono( | |
| 983 | - type_scale::CHORD_METADATA_MAX_PX, | |
| 984 | - gpui::FontWeight::MEDIUM, | |
| 985 | - )) | |
| 986 | - .text_color(rgb(INK3())) | |
| 987 | - .child(tail), | |
| 990 | + .child( | |
| 991 | + div() | |
| 992 | + .type_style(type_scale::head()) | |
| 993 | + .text_color(rgb(INK3())) | |
| 994 | + .child("EXPORT"), | |
| 995 | + ) | |
| 996 | + .child( | |
| 997 | + div() | |
| 998 | + .min_w(px(0.)) | |
| 999 | + .truncate() | |
| 1000 | + .type_style(type_scale::mono( | |
| 1001 | + type_scale::CHORD_METADATA_MAX_PX, | |
| 1002 | + gpui::FontWeight::MEDIUM, | |
| 1003 | + )) | |
| 1004 | + .text_color(rgb(INK2())) | |
| 1005 | + .child(status_line), | |
| 1006 | + ), | |
| 988 | 1007 | ) |
| 989 | - // §4: "the single bordered chip in the whole | |
| 990 | - // room" -- ghosts everywhere else in this card, | |
| 991 | - // one border here, wearing its chord live off | |
| 992 | - // the keymap so a rebind cannot leave it stale. | |
| 993 | 1008 | .child( |
| 994 | 1009 | div() |
| 995 | - .id("export-confirm") | |
| 996 | - .mt(px(4.)) | |
| 1010 | + .flex_1() | |
| 1011 | + .min_h(px(0.)) | |
| 997 | 1012 | .flex() |
| 998 | - .items_center() | |
| 999 | - .justify_center() | |
| 1000 | - .gap(px(6.)) | |
| 1001 | - .h(px(CONTROL_H)) | |
| 1002 | - .px(px(10.)) | |
| 1003 | - .rounded(px(3.)) | |
| 1004 | - .border_1() | |
| 1005 | - .border_color(rgb(match blocked.is_some() { | |
| 1006 | - true => INK4(), | |
| 1007 | - false => INK2(), | |
| 1008 | - })) | |
| 1009 | - .when(blocked.is_none(), |d| d.cursor_pointer()) | |
| 1010 | - .when(blocked.is_some(), |d| d.cursor_not_allowed()) | |
| 1011 | - .hover(|s| s.bg(rgb(DARK_RAISED()))) | |
| 1012 | - .on_click(cx.listener(|this, _: &ClickEvent, _, cx| { | |
| 1013 | - this.start_export(cx) | |
| 1014 | - })) | |
| 1015 | - .type_style(type_scale::label( | |
| 1016 | - type_scale::LABEL_ROW_PX, | |
| 1017 | - gpui::FontWeight::MEDIUM, | |
| 1018 | - )) | |
| 1019 | - .text_color(rgb(match blocked.is_some() { | |
| 1020 | - true => INK4(), | |
| 1021 | - false => INK1(), | |
| 1022 | - })) | |
| 1023 | - .child(action) | |
| 1024 | - .when(blocked.is_none(), |d| { | |
| 1025 | - d.child( | |
| 1026 | - div() | |
| 1027 | - .type_style(type_scale::mono( | |
| 1028 | - type_scale::CHORD_METADATA_MIN_PX, | |
| 1029 | - gpui::FontWeight::MEDIUM, | |
| 1030 | - )) | |
| 1031 | - .text_color(rgb(INK3())) | |
| 1032 | - .child(self.keymap.chord(ActionId::Export)), | |
| 1033 | - ) | |
| 1034 | - }), | |
| 1035 | - ), | |
| 1013 | + .gap(px(10.)) | |
| 1014 | + .child( | |
| 1015 | + div() | |
| 1016 | + .id("export-rows") | |
| 1017 | + .flex_1() | |
| 1018 | + .min_w(px(0.)) | |
| 1019 | + .h_full() | |
| 1020 | + .flex() | |
| 1021 | + .flex_col() | |
| 1022 | + .gap(px(2.)) | |
| 1023 | + .overflow_y_scroll() | |
| 1024 | + .children(list), | |
| 1025 | + ) | |
| 1026 | + .child( | |
| 1027 | + div() | |
| 1028 | + .flex_none() | |
| 1029 | + .w(px(300.)) | |
| 1030 | + .h_full() | |
| 1031 | + .flex() | |
| 1032 | + .flex_col() | |
| 1033 | + .justify_end() | |
| 1034 | + .gap(px(4.)) | |
| 1035 | + .border_l_1() | |
| 1036 | + .border_color(rgb(DARK_HAIRLINE())) | |
| 1037 | + .pl(px(8.)) | |
| 1038 | + .child(summary(head.into(), INK2())) | |
| 1039 | + .children(self.range.map(|(start, end)| { | |
| 1040 | + summary( | |
| 1041 | + format!( | |
| 1042 | + "RANGE {}\u{2013}{} ({})", | |
| 1043 | + timecode( | |
| 1044 | + f64::from(start) / self.fps, | |
| 1045 | + self.fps | |
| 1046 | + ), | |
| 1047 | + timecode(f64::from(end) / self.fps, self.fps), | |
| 1048 | + frames_timecode(end - start, self.fps), | |
| 1049 | + ) | |
| 1050 | + .into(), | |
| 1051 | + INK3(), | |
| 1052 | + ) | |
| 1053 | + })) | |
| 1054 | + .child(summary(tail.into(), INK3())) | |
| 1055 | + // §4: "the single bordered chip in | |
| 1056 | + // the whole room" -- ghosts | |
| 1057 | + // everywhere else in this card, one | |
| 1058 | + // border here, wearing its chord | |
| 1059 | + // live off the keymap so a rebind | |
| 1060 | + // cannot leave it stale. | |
| 1061 | + .child( | |
| 1062 | + div() | |
| 1063 | + .id("export-confirm") | |
| 1064 | + .mt(px(4.)) | |
| 1065 | + .flex() | |
| 1066 | + .items_center() | |
| 1067 | + .justify_center() | |
| 1068 | + .gap(px(6.)) | |
| 1069 | + .h(px(CONTROL_H)) | |
| 1070 | + .px(px(10.)) | |
| 1071 | + .rounded(px(3.)) | |
| 1072 | + .border_1() | |
| 1073 | + .border_color(rgb(match blocked.is_some() { | |
| 1074 | + true => INK4(), | |
| 1075 | + false => INK2(), | |
| 1076 | + })) | |
| 1077 | + .when(blocked.is_none(), |d| d.cursor_pointer()) | |
| 1078 | + .when(blocked.is_some(), |d| { | |
| 1079 | + d.cursor_not_allowed() | |
| 1080 | + }) | |
| 1081 | + .hover(|s| s.bg(rgb(DARK_RAISED()))) | |
| 1082 | + .on_click(cx.listener( | |
| 1083 | + |this, _: &ClickEvent, _, cx| { | |
| 1084 | + this.start_export(cx) | |
| 1085 | + }, | |
| 1086 | + )) | |
| 1087 | + .type_style(type_scale::label( | |
| 1088 | + type_scale::LABEL_ROW_PX, | |
| 1089 | + gpui::FontWeight::MEDIUM, | |
| 1090 | + )) | |
| 1091 | + .text_color(rgb(match blocked.is_some() { | |
| 1092 | + true => INK4(), | |
| 1093 | + false => INK1(), | |
| 1094 | + })) | |
| 1095 | + .child(action) | |
| 1096 | + .when(blocked.is_none(), |d| { | |
| 1097 | + d.child( | |
| 1098 | + div() | |
| 1099 | + .type_style(type_scale::mono( | |
| 1100 | + type_scale::CHORD_METADATA_MIN_PX, | |
| 1101 | + gpui::FontWeight::MEDIUM, | |
| 1102 | + )) | |
| 1103 | + .text_color(rgb(INK3())) | |
| 1104 | + .child( | |
| 1105 | + self.keymap | |
| 1106 | + .chord(ActionId::Export), | |
| 1107 | + ), | |
| 1108 | + ) | |
| 1109 | + }), | |
| 1110 | + ), | |
| 1111 | + ), | |
| 1112 | + ) | |
| 1113 | + .into_any_element(), | |
| 1036 | 1114 | ) |
| 1037 | 1115 | .into_any_element(), |
| 1038 | 1116 | ); |
crates/app/src/ui/dock_stance.rsmodified+40 -0
| @@ -260,6 +260,7 @@ fn source_row( | ||
| 260 | 260 | let (path, stream) = (row.path.clone(), row.stream); |
| 261 | 261 | let dragged = (path.clone(), stream); |
| 262 | 262 | let dot_path = path.clone(); |
| 263 | + let menu_path = path.clone(); | |
| 263 | 264 | let ghost = name.clone(); |
| 264 | 265 | div() |
| 265 | 266 | .id(("dock-source", i)) |
| @@ -283,6 +284,28 @@ fn source_row( | ||
| 283 | 284 | // line, so the general focus/selection ring applies, the same one |
| 284 | 285 | // the bench already uses for the same job. |
| 285 | 286 | .when(picked, |d| d.border_1().border_color(rgb(INK1()))) |
| 287 | + // Right-click ANYWHERE on the row opens the row's menu -- Add, | |
| 288 | + // Remove, Reveal, Properties (DESIGN §9: "verbs of the thing under | |
| 289 | + // the cursor"). It used to hang off the 8px ink dot alone, and only | |
| 290 | + // for a usable row, which is how the room shipped with no reachable | |
| 291 | + // way to take a source out of the library at all (user 2026-08-21: | |
| 292 | + // "can not remove a media from library") -- and the one row that | |
| 293 | + // most wants removing, a file the editor cannot use, was the one | |
| 294 | + // row whose menu was gated off. Unconditional now, dot included. | |
| 295 | + .on_mouse_down( | |
| 296 | + MouseButton::Right, | |
| 297 | + cx.listener(move |this, event: &MouseDownEvent, _, cx| { | |
| 298 | + cx.stop_propagation(); | |
| 299 | + this.selected_asset = Some((menu_path.clone(), stream)); | |
| 300 | + this.library_menu = Some(LibraryMenu { | |
| 301 | + path: menu_path.clone(), | |
| 302 | + stream, | |
| 303 | + at: event.position, | |
| 304 | + details: false, | |
| 305 | + }); | |
| 306 | + cx.notify(); | |
| 307 | + }), | |
| 308 | + ) | |
| 286 | 309 | .when(usable, |d| { |
| 287 | 310 | d.cursor_pointer() |
| 288 | 311 | .hover(|s| s.bg(rgb(DARK_RAISED()))) |
| @@ -551,6 +574,23 @@ fn sources_tab(player: &Player, cx: &mut Context<Player>) -> impl IntoElement { | ||
| 551 | 574 | "imports the file named on the clipboard", |
| 552 | 575 | player, |
| 553 | 576 | cx.listener(|this, _: &ClickEvent, _, cx| this.paste_file_path(cx)), |
| 577 | + )) | |
| 578 | + // Subtitles come in through the same door every other file | |
| 579 | + // does. This row is `↓S`'s new geographic home: the spine's | |
| 580 | + // TRACK group carried it as a two-glyph badge on a 56px rail | |
| 581 | + // that no longer had the height for it (user 2026-08-21: | |
| 582 | + // "the spine menu is too crowded"), and an import belongs | |
| 583 | + // beside the other two imports, not beside the lane verbs. | |
| 584 | + .child(ghost_verb( | |
| 585 | + "dock-import-subtitles", | |
| 586 | + "Import subtitles", | |
| 587 | + ActionId::ImportSubtitles, | |
| 588 | + false, | |
| 589 | + "reads an .srt/.ass file onto a subtitle lane", | |
| 590 | + player, | |
| 591 | + cx.listener(|this, _: &ClickEvent, window, cx| { | |
| 592 | + this.act(ActionId::ImportSubtitles, window, cx) | |
| 593 | + }), | |
| 554 | 594 | )), |
| 555 | 595 | ) |
| 556 | 596 | .child({ |
crates/app/src/ui/library.rsmodified+14 -11
| @@ -657,6 +657,19 @@ impl Player { | ||
| 657 | 657 | // right-clicked is not a row, and one this moment refuses is drawn |
| 658 | 658 | // dimmed and says why in place of its hint. |
| 659 | 659 | for item in row_items(ctx) { |
| 660 | + // DESIGN §9: destructive verbs sit below a rule line. One | |
| 661 | + // hairline, drawn once, above whichever of the two removes | |
| 662 | + // this row context offers. | |
| 663 | + if matches!(item, RowItem::Remove | RowItem::RemoveWithClips) && darkroom { | |
| 664 | + rows.push( | |
| 665 | + div() | |
| 666 | + .flex_none() | |
| 667 | + .my(px(3.)) | |
| 668 | + .h(px(1.)) | |
| 669 | + .bg(rgb(DARK_HAIRLINE())) | |
| 670 | + .into_any_element(), | |
| 671 | + ); | |
| 672 | + } | |
| 660 | 673 | let refusal = row_enable(item, ctx); |
| 661 | 674 | let enabled = refusal.yes(); |
| 662 | 675 | rows.push( |
| @@ -711,17 +724,7 @@ impl Player { | ||
| 711 | 724 | }), |
| 712 | 725 | ) |
| 713 | 726 | .child( |
| 714 | - div() | |
| 715 | - .id("library-menu-card") | |
| 716 | - .absolute() | |
| 717 | - .left(px(x)) | |
| 718 | - .top(px(y)) | |
| 719 | - .w(px(MENU_W)) | |
| 720 | - .flex() | |
| 721 | - .flex_col() | |
| 722 | - .p(px(MENU_PAD)) | |
| 723 | - .rounded(px(6.)) | |
| 724 | - .bg(rgb(BG_RAISED())) | |
| 727 | + menu_plate("library-menu-card", x, y, darkroom) | |
| 725 | 728 | // Painted after the scrim, so this listener runs first |
| 726 | 729 | // and a press meant for an item never closes the menu |
| 727 | 730 | // out from under its own click (`context_card`). |
crates/app/src/ui/overlays.rsmodified+55 -35
| @@ -617,11 +617,28 @@ impl Player { | ||
| 617 | 617 | // The one item that is not about this clip says so, and says it |
| 618 | 618 | // here rather than in the registry: the stroke is global too, |
| 619 | 619 | // but its row in the keys menu is not sitting on a clip. |
| 620 | + // The registry's label is a sentence -- it has to be, the keys | |
| 621 | + // overlay reads the same string -- and a sentence in a 260px | |
| 622 | + // plate row is cut mid-word by the chord column beside it | |
| 623 | + // ("Ungroup the selection (clips anc", "Group the selection | |
| 624 | + // (ctrl-c"). DESIGN §7's rule for the bench applies to a menu | |
| 625 | + // too: labels never truncate into soup. The verb is the head | |
| 626 | + // of the sentence, up to its first parenthesis or em-dash; | |
| 627 | + // the tail is what the row's tooltip carries, so nothing is | |
| 628 | + // lost, it just stops being drawn over the chord. | |
| 629 | + let full = action.label(); | |
| 630 | + let verb = full | |
| 631 | + .split_once(" (") | |
| 632 | + .map(|(head, _)| head) | |
| 633 | + .or_else(|| full.split_once(" — ").map(|(head, _)| head)) | |
| 634 | + .or_else(|| full.split_once(": ").map(|(head, _)| head)) | |
| 635 | + .unwrap_or(full); | |
| 620 | 636 | let label = if matches!(action, ActionId::ToggleMute | ActionId::Paste) { |
| 621 | - format!("{} (global)", action.label()) | |
| 637 | + format!("{verb} (global)") | |
| 622 | 638 | } else { |
| 623 | - action.label().to_string() | |
| 639 | + verb.to_string() | |
| 624 | 640 | }; |
| 641 | + let say: SharedString = full.to_string().into(); | |
| 625 | 642 | rows.push( |
| 626 | 643 | row(rows.len()) |
| 627 | 644 | // Truncated and shrinkable: a long label ("Transform — |
| @@ -630,6 +647,7 @@ impl Player { | ||
| 630 | 647 | // of sharing the row with it, which is why Transform |
| 631 | 648 | // showed no stroke while a short label like Colour's |
| 632 | 649 | // did. |
| 650 | + .tooltip(move |_, cx| cx.new(|_| Tip(say.clone())).into()) | |
| 633 | 651 | .child(div().min_w(px(0.)).flex_shrink().truncate().child(label)) |
| 634 | 652 | .child(match refusal.why() { |
| 635 | 653 | // One truncated line, like the details side: a |
| @@ -737,19 +755,10 @@ impl Player { | ||
| 737 | 755 | }), |
| 738 | 756 | ) |
| 739 | 757 | .child( |
| 740 | - div() | |
| 741 | - // Only so the details side can carry a tooltip, which | |
| 742 | - // gpui gives to identified elements alone. | |
| 743 | - .id("menu-card") | |
| 744 | - .absolute() | |
| 745 | - .left(px(x)) | |
| 746 | - .top(px(y)) | |
| 747 | - .w(px(MENU_W)) | |
| 748 | - .flex() | |
| 749 | - .flex_col() | |
| 750 | - .p(px(MENU_PAD)) | |
| 751 | - .rounded(px(6.)) | |
| 752 | - .bg(rgb(BG_RAISED())) | |
| 758 | + // One plate shape for all three hanging menus | |
| 759 | + // ([`menu_plate`]) -- the id is still this menu's own, so | |
| 760 | + // the details side keeps its tooltip. | |
| 761 | + menu_plate("menu-card", x, y, darkroom) | |
| 753 | 762 | // Painted after the scrim, so this listener runs first |
| 754 | 763 | // (gpui bubbles mouse events in reverse, window.rs:3705) |
| 755 | 764 | // and a press meant for an item never closes the menu |
| @@ -819,17 +828,36 @@ impl Player { | ||
| 819 | 828 | .text_color(rgb(INK2())) |
| 820 | 829 | }) |
| 821 | 830 | .cursor_pointer() |
| 822 | - .hover(|s| s.bg(rgb(BG_HOVER()))) | |
| 831 | + // DEFECT (user 2026-08-21: "some menus are belongs to old | |
| 832 | + // ui ... for example resolution picker"): the list painted | |
| 833 | + // the legacy sheet's greys (`BG_RAISED`/`BG_HOVER`/ | |
| 834 | + // `BG_SELECTED`, `FG_*`) in the darkroom too, so a room | |
| 835 | + // whose every other plate is canvas-on-panel opened one | |
| 836 | + // pale rounded card. The darkroom pass below is the same | |
| 837 | + // plate grammar `context_card`/`library_card` already | |
| 838 | + // draw: one `raised` fill step for hover, `ink1` for the | |
| 839 | + // row in force, no second grey. | |
| 840 | + .hover(|s| s.bg(rgb(if darkroom { DARK_RAISED() } else { BG_HOVER() }))) | |
| 823 | 841 | // The mark is a glyph as well as a highlight, like the |
| 824 | 842 | // export card's rows: a background alone is gone under a |
| 825 | 843 | // hover and invisible to anyone who cannot tell the two |
| 826 | 844 | // greys apart (WCAG 1.4.1). |
| 827 | - .when(picked, |d| d.bg(rgb(BG_SELECTED()))) | |
| 845 | + .when(picked, |d| { | |
| 846 | + d.bg(rgb(if darkroom { | |
| 847 | + DARK_RAISED() | |
| 848 | + } else { | |
| 849 | + BG_SELECTED() | |
| 850 | + })) | |
| 851 | + .when(darkroom, |d| d.text_color(rgb(INK1()))) | |
| 852 | + }) | |
| 828 | 853 | // Where the keyboard is, said after the mark so the cursor |
| 829 | - // is visible on the picked row too -- and as a background, | |
| 830 | - // not a border, because a row that grew a stroke would move | |
| 831 | - // every row under it. | |
| 832 | - .when(n == picker.sel, |d| d.bg(rgb(BG_HOVER()))) | |
| 854 | + // is visible on the picked row too -- and as a border in | |
| 855 | + // the darkroom (DESIGN §4's 1px `ink1` focus ring) rather | |
| 856 | + // than a second grey nobody can tell from the first. | |
| 857 | + .when(n == picker.sel, |d| match darkroom { | |
| 858 | + true => d.border_1().border_color(rgb(INK1())), | |
| 859 | + false => d.bg(rgb(BG_HOVER())), | |
| 860 | + }) | |
| 833 | 861 | .child( |
| 834 | 862 | div() |
| 835 | 863 | .flex() |
| @@ -849,9 +877,11 @@ impl Player { | ||
| 849 | 877 | .text_size(px(11.)) |
| 850 | 878 | // On the picked row the dim ink sits on the |
| 851 | 879 | // highlight, where it is only 3.3:1 (WCAG 1.4.3). |
| 852 | - .text_color(rgb(match picked { | |
| 853 | - true => FG_PRIMARY(), | |
| 854 | - false => FG_SECONDARY(), | |
| 880 | + .text_color(rgb(match (darkroom, picked) { | |
| 881 | + (true, true) => INK2(), | |
| 882 | + (true, false) => INK3(), | |
| 883 | + (false, true) => FG_PRIMARY(), | |
| 884 | + (false, false) => FG_SECONDARY(), | |
| 855 | 885 | })) |
| 856 | 886 | .when(darkroom, |d| { |
| 857 | 887 | d.type_style(type_scale::mono( |
| @@ -893,17 +923,7 @@ impl Player { | ||
| 893 | 923 | }), |
| 894 | 924 | ) |
| 895 | 925 | .child( |
| 896 | - div() | |
| 897 | - .id("picker-card") | |
| 898 | - .absolute() | |
| 899 | - .left(px(x)) | |
| 900 | - .top(px(y)) | |
| 901 | - .w(px(MENU_W)) | |
| 902 | - .flex() | |
| 903 | - .flex_col() | |
| 904 | - .p(px(MENU_PAD)) | |
| 905 | - .rounded(px(6.)) | |
| 906 | - .bg(rgb(BG_RAISED())) | |
| 926 | + menu_plate("picker-card", x, y, darkroom) | |
| 907 | 927 | // Painted after the scrim, so this listener runs first |
| 908 | 928 | // and a press meant for a row never closes the list out |
| 909 | 929 | // from under its own click (`context_card`). |
crates/app/src/ui/settings_stance.rsmodified+139 -21
| @@ -66,6 +66,34 @@ fn row( | ||
| 66 | 66 | row_ink(id, label_text, value, hint, player, on_click, INK1()) |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | +/// [`row`] for a setting a chord also reaches: the stroke rides in the row's | |
| 70 | +/// own right-hand side, ahead of the value, in the mono chord ink every other | |
| 71 | +/// darkroom surface wears it in (DESIGN §4 -- "every command wears its chord, | |
| 72 | +/// everywhere it appears"). Three settings arrived here from the spine when | |
| 73 | +/// the rail ran out of height (proxies, auto-proxies, the palette); each one | |
| 74 | +/// had its chord on the rail's badge, and none of them may lose it on the way | |
| 75 | +/// over. | |
| 76 | +fn row_keyed( | |
| 77 | + id: &'static str, | |
| 78 | + label_text: &'static str, | |
| 79 | + value: impl Into<SharedString>, | |
| 80 | + hint: &'static str, | |
| 81 | + action: ActionId, | |
| 82 | + player: &Player, | |
| 83 | + on_click: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static, | |
| 84 | +) -> impl IntoElement { | |
| 85 | + row_full( | |
| 86 | + id, | |
| 87 | + label_text, | |
| 88 | + value, | |
| 89 | + hint, | |
| 90 | + Some(player.keymap.chord(action).into()), | |
| 91 | + player, | |
| 92 | + on_click, | |
| 93 | + INK1(), | |
| 94 | + ) | |
| 95 | +} | |
| 96 | + | |
| 69 | 97 | /// [`row`] with the value's ink chosen by the caller -- [`INK4`] for a value |
| 70 | 98 | /// that is not really a value yet (nothing to show until a project opens), |
| 71 | 99 | /// so it reads as absent rather than as a fifth real setting. |
| @@ -77,6 +105,24 @@ fn row_ink( | ||
| 77 | 105 | player: &Player, |
| 78 | 106 | on_click: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static, |
| 79 | 107 | value_ink: u32, |
| 108 | +) -> impl IntoElement { | |
| 109 | + row_full(id, label_text, value, hint, None, player, on_click, value_ink) | |
| 110 | +} | |
| 111 | + | |
| 112 | +/// The one row body all three wrappers share. `chord` is the stroke that also | |
| 113 | +/// reaches this setting, drawn in mono `ink3` *beside* the value rather than | |
| 114 | +/// over it -- three settings came here off the spine and each one keeps the | |
| 115 | +/// badge it wore there (DESIGN §4). | |
| 116 | +#[allow(clippy::too_many_arguments)] | |
| 117 | +fn row_full( | |
| 118 | + id: &'static str, | |
| 119 | + label_text: &'static str, | |
| 120 | + value: impl Into<SharedString>, | |
| 121 | + hint: &'static str, | |
| 122 | + chord: Option<SharedString>, | |
| 123 | + player: &Player, | |
| 124 | + on_click: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static, | |
| 125 | + value_ink: u32, | |
| 80 | 126 | ) -> impl IntoElement { |
| 81 | 127 | let value: SharedString = value.into(); |
| 82 | 128 | let hint: SharedString = hint.into(); |
| @@ -107,10 +153,27 @@ fn row_ink( | ||
| 107 | 153 | .child( |
| 108 | 154 | div() |
| 109 | 155 | .flex_none() |
| 110 | - .font(value_style.font) | |
| 111 | - .text_size(value_style.size) | |
| 112 | - .text_color(rgb(value_ink)) | |
| 113 | - .child(value), | |
| 156 | + .flex() | |
| 157 | + .items_baseline() | |
| 158 | + .gap(px(8.)) | |
| 159 | + .children(chord.map(|chord| { | |
| 160 | + let chord_style = type_scale::mono( | |
| 161 | + type_scale::CHORD_METADATA_MIN_PX, | |
| 162 | + gpui::FontWeight::MEDIUM, | |
| 163 | + ); | |
| 164 | + div() | |
| 165 | + .font(chord_style.font) | |
| 166 | + .text_size(chord_style.size) | |
| 167 | + .text_color(rgb(INK3())) | |
| 168 | + .child(chord) | |
| 169 | + })) | |
| 170 | + .child( | |
| 171 | + div() | |
| 172 | + .font(value_style.font) | |
| 173 | + .text_size(value_style.size) | |
| 174 | + .text_color(rgb(value_ink)) | |
| 175 | + .child(value), | |
| 176 | + ), | |
| 114 | 177 | ) |
| 115 | 178 | } |
| 116 | 179 | |
| @@ -286,7 +349,7 @@ fn editor_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement | ||
| 286 | 349 | .flex_col() |
| 287 | 350 | .gap(px(2.)) |
| 288 | 351 | .child(section_head("EDITOR · this machine, this window")) |
| 289 | - .child(row( | |
| 352 | + .child(row_keyed( | |
| 290 | 353 | "settings-proxies", |
| 291 | 354 | "Proxies", |
| 292 | 355 | match player.proxies_on { |
| @@ -294,17 +357,34 @@ fn editor_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement | ||
| 294 | 357 | false => "Off".to_string(), |
| 295 | 358 | }, |
| 296 | 359 | "cuts on small stand-ins of the big films; the sound and every export stay the film's own -- default kept in ~/.config/edith, the pick for an open project in its own .edith", |
| 360 | + ActionId::ToggleProxies, | |
| 297 | 361 | player, |
| 298 | 362 | cx.listener(|this, _: &ClickEvent, _, cx| this.toggle_proxies(cx)), |
| 299 | 363 | )) |
| 300 | - .child(row( | |
| 364 | + .child(row_keyed( | |
| 301 | 365 | "settings-auto-proxies", |
| 302 | 366 | "Auto proxies", |
| 303 | 367 | if player.auto_proxies_on { "On" } else { "Off" }, |
| 304 | 368 | "makes a stand-in for every big film as it is imported -- default kept in ~/.config/edith, the pick for an open project in its own .edith", |
| 369 | + ActionId::ToggleAutoProxies, | |
| 305 | 370 | player, |
| 306 | 371 | cx.listener(|this, _: &ClickEvent, _, cx| this.toggle_auto_proxies(cx)), |
| 307 | 372 | )) |
| 373 | + // The room's own palette, moved off the spine (user 2026-08-21: the | |
| 374 | + // rail was too crowded to fit its own rows) -- a preference kept in | |
| 375 | + // ~/.config/edith, so the EDITOR section is where it belongs; the | |
| 376 | + // same `Pick::Theme` list `ActionId::Theme` has always opened. | |
| 377 | + .child(row_keyed( | |
| 378 | + "settings-theme", | |
| 379 | + "Palette", | |
| 380 | + crate::ui::theme::active().label(), | |
| 381 | + "the room's own greys; the film's inks are extracted, never picked", | |
| 382 | + ActionId::Theme, | |
| 383 | + player, | |
| 384 | + cx.listener(|this, event: &ClickEvent, _, cx| { | |
| 385 | + this.open_picker(Pick::Theme, event.position(), cx) | |
| 386 | + }), | |
| 387 | + )) | |
| 308 | 388 | .child(row( |
| 309 | 389 | "settings-subtitle-style", |
| 310 | 390 | "Subtitle font", |
| @@ -315,16 +395,38 @@ fn editor_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement | ||
| 315 | 395 | )) |
| 316 | 396 | } |
| 317 | 397 | |
| 318 | -/// The page itself: a modal card, the same drag-scrim-and-click-away shape | |
| 319 | -/// every other card in this room takes ([`crate::ui::cards`]'s | |
| 320 | -/// eq/color/transform/speed cards) -- closed by a click away or `esc`, | |
| 321 | -/// through [`Player::close_card`], exactly like them. | |
| 322 | -pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElement { | |
| 398 | +/// The page itself: a plate in the room's own below-picture footprint, | |
| 399 | +/// closed by a click away or `esc` through [`Player::close_card`] like every | |
| 400 | +/// other card here. | |
| 401 | +/// | |
| 402 | +/// It used to be a centred modal over a dimming scrim, which put the whole | |
| 403 | +/// settings sheet -- and every picker opened off one of its rows -- straight | |
| 404 | +/// over the picture: DESIGN §11 check 6's one hard occlusion rule, and half | |
| 405 | +/// of the user's 2026-08-21 report about menus "not aligning with our | |
| 406 | +/// design". Anchored to [`crate::ui::stance::below_picture_floor`] it sits | |
| 407 | +/// over the bench and ledger exactly as the export plate and the menus | |
| 408 | +/// already do, and the catcher behind it paints nothing rather than tinting | |
| 409 | +/// the frame. | |
| 410 | +pub(crate) fn render( | |
| 411 | + player: &Player, | |
| 412 | + window_size: Size<Pixels>, | |
| 413 | + cx: &mut Context<Player>, | |
| 414 | +) -> impl IntoElement { | |
| 415 | + let floor = crate::ui::stance::below_picture_floor( | |
| 416 | + f32::from(window_size.height), | |
| 417 | + player.split_px(Split::Bench, window_size), | |
| 418 | + ); | |
| 419 | + // Below the time band, not merely below the picture: the transport and | |
| 420 | + // the Export chip live on that band and a sheet over them hides controls | |
| 421 | + // the editor is still using. Bench + ledger is this page's footprint. | |
| 422 | + let top = floor + crate::ui::stance::TIME_BAND_H; | |
| 423 | + let room = f32::from(window_size.height) - top; | |
| 323 | 424 | drag_scrim(cx) |
| 324 | 425 | .flex() |
| 325 | 426 | .justify_center() |
| 326 | - .items_center() | |
| 327 | - .bg(rgba(SCRIM())) | |
| 427 | + .items_end() | |
| 428 | + .pt(px(top + 6.)) | |
| 429 | + .pb(px(6.)) | |
| 328 | 430 | .on_mouse_down( |
| 329 | 431 | MouseButton::Left, |
| 330 | 432 | cx.listener(|this, _: &MouseDownEvent, _, cx| { |
| @@ -336,14 +438,18 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | ||
| 336 | 438 | .child( |
| 337 | 439 | div() |
| 338 | 440 | .id("settings-card") |
| 441 | + // The whole footprint's width, two columns inside: at 720p a | |
| 442 | + // 420px single column put Mix, the palette and the subtitle | |
| 443 | + // font below a fold with no visible scrollbar -- settings an | |
| 444 | + // editor cannot see are settings only a chord reaches, which | |
| 445 | + // is the defect class this page exists to close. | |
| 339 | 446 | .w_full() |
| 340 | - .max_w(px(360.)) | |
| 341 | - .max_h(relative(0.86)) | |
| 447 | + .max_h(px((room - 12.).max(120.))) | |
| 342 | 448 | .on_mouse_down(MouseButton::Left, swallow) |
| 343 | 449 | .flex() |
| 344 | 450 | .flex_col() |
| 345 | - .gap(px(8.)) | |
| 346 | - .p(px(12.)) | |
| 451 | + .gap(px(6.)) | |
| 452 | + .p(px(8.)) | |
| 347 | 453 | .rounded(px(6.)) |
| 348 | 454 | .bg(rgb(DARK_PANEL())) |
| 349 | 455 | .border_1() |
| @@ -373,10 +479,22 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | ||
| 373 | 479 | .min_h(px(0.)) |
| 374 | 480 | .overflow_y_scroll() |
| 375 | 481 | .flex() |
| 376 | - .flex_col() | |
| 377 | - .gap(px(10.)) | |
| 378 | - .child(project_section(player, cx)) | |
| 379 | - .child(editor_section(player, cx)), | |
| 482 | + .gap(px(16.)) | |
| 483 | + .child( | |
| 484 | + div() | |
| 485 | + .flex_1() | |
| 486 | + .min_w(px(0.)) | |
| 487 | + .child(project_section(player, cx)), | |
| 488 | + ) | |
| 489 | + .child( | |
| 490 | + div() | |
| 491 | + .flex_1() | |
| 492 | + .min_w(px(0.)) | |
| 493 | + .border_l_1() | |
| 494 | + .border_color(rgb(DARK_HAIRLINE())) | |
| 495 | + .pl(px(12.)) | |
| 496 | + .child(editor_section(player, cx)), | |
| 497 | + ), | |
| 380 | 498 | ), |
| 381 | 499 | ) |
| 382 | 500 | } |
crates/app/src/ui/spine_stance.rsmodified+59 -96
| @@ -66,7 +66,7 @@ fn glyph( | ||
| 66 | 66 | .flex_col() |
| 67 | 67 | .items_center() |
| 68 | 68 | .gap(px(1.)) |
| 69 | - .px(px(4.)) | |
| 69 | + .px(px(3.)) | |
| 70 | 70 | .py(px(1.)) |
| 71 | 71 | .rounded(px(3.)) |
| 72 | 72 | .when(active, |d| d.bg(rgb(DARK_RAISED()))) |
| @@ -158,7 +158,7 @@ fn trim_control(active: bool, player: &Player, cx: &mut Context<Player>) -> impl | ||
| 158 | 158 | .flex_col() |
| 159 | 159 | .items_center() |
| 160 | 160 | .gap(px(1.)) |
| 161 | - .px(px(4.)) | |
| 161 | + .px(px(3.)) | |
| 162 | 162 | .py(px(1.)) |
| 163 | 163 | .rounded(px(3.)) |
| 164 | 164 | .when(active, |d| d.bg(rgb(DARK_RAISED()))) |
| @@ -189,9 +189,14 @@ fn pair(left: impl IntoElement, right: impl IntoElement) -> impl IntoElement { | ||
| 189 | 189 | div() |
| 190 | 190 | .flex_none() |
| 191 | 191 | .flex() |
| 192 | + .w_full() | |
| 192 | 193 | .items_center() |
| 193 | 194 | .justify_center() |
| 194 | - .gap(px(6.)) | |
| 195 | + // 4px, not 6: two two-glyph halves plus their own padding used to | |
| 196 | + // measure wider than the 56px rail and bled past its left edge | |
| 197 | + // (measured at 1280x720: the `AP`/`FS` row started at x=0, outside | |
| 198 | + // the spine's own surface). | |
| 199 | + .gap(px(4.)) | |
| 195 | 200 | .child(left) |
| 196 | 201 | .child(right) |
| 197 | 202 | } |
| @@ -336,60 +341,46 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | ||
| 336 | 341 | cx, |
| 337 | 342 | )) |
| 338 | 343 | .child(group_head("track")) |
| 339 | - .child(glyph( | |
| 340 | - "spine-add-video", | |
| 341 | - "+V", | |
| 342 | - ActionId::AddVideoLane, | |
| 343 | - false, | |
| 344 | - false, | |
| 345 | - player, | |
| 346 | - cx, | |
| 347 | - )) | |
| 348 | - .child(glyph( | |
| 349 | - "spine-add-audio", | |
| 350 | - "+A", | |
| 351 | - ActionId::AddAudioLane, | |
| 352 | - false, | |
| 353 | - false, | |
| 354 | - player, | |
| 355 | - cx, | |
| 356 | - )) | |
| 357 | - // The subtitle trio (homeless per this task's audit): AddSubtitleLane | |
| 358 | - // joins +V/+A on the same "+letter" grammar per this task's own | |
| 359 | - // instruction ("+S joins +V/+A in TRACK"); remove/import are "the | |
| 360 | - // subtitle work" the instruction says to place them beside, so they | |
| 361 | - // share the row underneath rather than each eating a full row (the | |
| 362 | - // same space-saving `pair` the walk-cuts and zoom in/out already | |
| 363 | - // use). ToggleSubtitles (whether the cues draw over the picture at | |
| 364 | - // all) is the fourth subtitle-lane command with no home anywhere in | |
| 365 | - // the darkroom -- filed here too, "CC" being the glyph every player | |
| 366 | - // already uses for exactly this toggle, rather than in the quiet | |
| 367 | - // ROOM cluster below: cue visibility is judged shot to shot, closer | |
| 368 | - // in frequency to a view toggle used often than to a once-a-session | |
| 369 | - // preference. | |
| 370 | - .child(glyph( | |
| 371 | - "spine-add-subtitle", | |
| 372 | - "+S", | |
| 373 | - ActionId::AddSubtitleLane, | |
| 374 | - false, | |
| 375 | - false, | |
| 376 | - player, | |
| 377 | - cx, | |
| 344 | + .child(pair( | |
| 345 | + glyph( | |
| 346 | + "spine-add-video", | |
| 347 | + "+V", | |
| 348 | + ActionId::AddVideoLane, | |
| 349 | + false, | |
| 350 | + false, | |
| 351 | + player, | |
| 352 | + cx, | |
| 353 | + ), | |
| 354 | + glyph( | |
| 355 | + "spine-add-audio", | |
| 356 | + "+A", | |
| 357 | + ActionId::AddAudioLane, | |
| 358 | + false, | |
| 359 | + false, | |
| 360 | + player, | |
| 361 | + cx, | |
| 362 | + ), | |
| 378 | 363 | )) |
| 364 | + // The subtitle lane pair: add beside remove, one row, the same | |
| 365 | + // "+letter"/"−letter" grammar +V/+A above it already reads in. Import | |
| 366 | + // (`↓S`) left this rail entirely -- it is an import, so it lives in | |
| 367 | + // the dock's own IMPORT list beside "Add files" (`dock_stance`), | |
| 368 | + // where an editor already goes to bring a file into the room. That | |
| 369 | + // move is what takes this group from three crowded rows to two. | |
| 379 | 370 | .child(pair( |
| 380 | 371 | glyph( |
| 381 | - "spine-remove-subtitle", | |
| 382 | - "−S", | |
| 383 | - ActionId::RemoveSubtitleLane, | |
| 372 | + "spine-add-subtitle", | |
| 373 | + "+S", | |
| 374 | + ActionId::AddSubtitleLane, | |
| 384 | 375 | false, |
| 385 | 376 | false, |
| 386 | 377 | player, |
| 387 | 378 | cx, |
| 388 | 379 | ), |
| 389 | 380 | glyph( |
| 390 | - "spine-import-subtitles", | |
| 391 | - "↓S", | |
| 392 | - ActionId::ImportSubtitles, | |
| 381 | + "spine-remove-subtitle", | |
| 382 | + "−S", | |
| 383 | + ActionId::RemoveSubtitleLane, | |
| 393 | 384 | false, |
| 394 | 385 | false, |
| 395 | 386 | player, |
| @@ -405,45 +396,31 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | ||
| 405 | 396 | player, |
| 406 | 397 | cx, |
| 407 | 398 | )) |
| 408 | - // ROOM: the once-a-session/once-a-project acts this task's charter | |
| 409 | - // names explicitly (theme, proxies, screenshot, fullscreen) -- ink- | |
| 410 | - // demoted (`quiet: true`) and paired two-to-a-row to keep the group | |
| 411 | - // cheap, the same "rare acts live out of the way" pattern DESIGN §2 | |
| 412 | - // names for re-inking, applied here to the spine's own bottom | |
| 413 | - // instead of a right-click menu (these four are toggled/fired by a | |
| 414 | - // click, not by picking a source dot, so a context menu is not | |
| 415 | - // their shape). Left off this list: Save, which sits beside Export | |
| 416 | - // in the time band instead (see timeband_stance.rs) because the | |
| 417 | - // ledger already gives the saved/unsaved state a home there, and | |
| 418 | - // keymap.rs's own `Category::File` files Save beside Export and | |
| 419 | - // Screenshot on the strength of what each one writes. | |
| 399 | + // ROOM, cut to the three acts that are *acts* rather than settings | |
| 400 | + // (user 2026-08-21: "the spine menu is too crowded and looks weird | |
| 401 | + // also not fitting" -- measured at 1280x720 the rail overflowed its | |
| 402 | + // own height and the settings glyph, the last row, could only be | |
| 403 | + // reached by scrolling the spine). Theme, proxies and auto-proxies | |
| 404 | + // were the three that are *preferences*, not verbs: they are rows on | |
| 405 | + // the settings page now (`settings_stance`), which is where an | |
| 406 | + // editor already goes to change what the room is rather than what | |
| 407 | + // the film is -- so nothing lost a visible home (DESIGN §9) and the | |
| 408 | + // rail lost three rows. | |
| 420 | 409 | .child(group_head("room")) |
| 421 | 410 | .child(pair( |
| 422 | - glyph("spine-theme", "H", ActionId::Theme, false, true, player, cx), | |
| 423 | 411 | glyph( |
| 424 | - "spine-proxies", | |
| 425 | - "P", | |
| 426 | - ActionId::ToggleProxies, | |
| 427 | - player.proxies_on, | |
| 428 | - true, | |
| 429 | - player, | |
| 430 | - cx, | |
| 431 | - ), | |
| 432 | - )) | |
| 433 | - .child(pair( | |
| 434 | - glyph( | |
| 435 | - "spine-auto-proxies", | |
| 436 | - "AP", | |
| 437 | - ActionId::ToggleAutoProxies, | |
| 438 | - player.auto_proxies_on, | |
| 412 | + "spine-settings", | |
| 413 | + "St", | |
| 414 | + ActionId::Settings, | |
| 415 | + player.settings_open, | |
| 439 | 416 | true, |
| 440 | 417 | player, |
| 441 | 418 | cx, |
| 442 | 419 | ), |
| 443 | 420 | glyph( |
| 444 | - "spine-fullscreen", | |
| 445 | - "FS", | |
| 446 | - ActionId::Fullscreen, | |
| 421 | + "spine-screenshot", | |
| 422 | + "Sh", | |
| 423 | + ActionId::Screenshot, | |
| 447 | 424 | false, |
| 448 | 425 | true, |
| 449 | 426 | player, |
| @@ -451,27 +428,13 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | ||
| 451 | 428 | ), |
| 452 | 429 | )) |
| 453 | 430 | .child(glyph( |
| 454 | - "spine-screenshot", | |
| 455 | - "Sh", | |
| 456 | - ActionId::Screenshot, | |
| 431 | + "spine-fullscreen", | |
| 432 | + "FS", | |
| 433 | + ActionId::Fullscreen, | |
| 457 | 434 | false, |
| 458 | 435 | true, |
| 459 | 436 | player, |
| 460 | 437 | cx, |
| 461 | 438 | )) |
| 462 | - // The settings page's own visible door (user complaint: "some | |
| 463 | - // options are only reachable via keyboard shortcut") -- a chord | |
| 464 | - // alone is a defect class this room has hit repeatedly, so this | |
| 465 | - // glyph sits beside the other once-a-session ROOM acts even though | |
| 466 | - // its chord (`^,`) is a preference, not a mnemonic. | |
| 467 | - .child(glyph( | |
| 468 | - "spine-settings", | |
| 469 | - "St", | |
| 470 | - ActionId::Settings, | |
| 471 | - player.settings_open, | |
| 472 | - true, | |
| 473 | - player, | |
| 474 | - cx, | |
| 475 | - )) | |
| 476 | 439 | .child(div().flex_1()) |
| 477 | 440 | } |
crates/app/src/ui/stance.rsmodified+19 -6
| @@ -17,7 +17,7 @@ use crate::ui::type_scale::{self, Typeset}; | ||
| 17 | 17 | use crate::*; |
| 18 | 18 | |
| 19 | 19 | /// Left rail, full height (DESIGN §5). |
| 20 | -const SPINE_W: f32 = 56.; | |
| 20 | +pub(crate) const SPINE_W: f32 = 56.; | |
| 21 | 21 | /// Fixed strip under the screen: timecode, transport, cut readout, contact |
| 22 | 22 | /// strip, Export -- all placeholder at this step. Kept `pub(crate)` for |
| 23 | 23 | /// `layout::split_bounds`'s bench ceiling, the same one-door reason |
| @@ -301,7 +301,11 @@ fn ghost(player: &Player, glyph: &str, action: ActionId) -> impl IntoElement { | ||
| 301 | 301 | )) |
| 302 | 302 | .text_color(rgb(INK2())) |
| 303 | 303 | .child(glyph.to_string()) |
| 304 | - .child( | |
| 304 | + // The badge is skipped when the stroke IS the glyph: `?` over `?` | |
| 305 | + // drew as two identical rows stacked at the foot of the rail and read | |
| 306 | + // as a duplicated control rather than as one command wearing its own | |
| 307 | + // chord. | |
| 308 | + .children((player.keymap.chord(action) != glyph).then(|| { | |
| 305 | 309 | div() |
| 306 | 310 | .type_style(type_scale::mono( |
| 307 | 311 | type_scale::CHORD_METADATA_MIN_PX, |
| @@ -310,8 +314,8 @@ fn ghost(player: &Player, glyph: &str, action: ActionId) -> impl IntoElement { | ||
| 310 | 314 | .text_color(rgb(INK3())) |
| 311 | 315 | // FAULT 1: the badge shows the primary chord, compact -- |
| 312 | 316 | // same rule as every glyph in `spine_stance`. |
| 313 | - .child(player.keymap.chord(action)), | |
| 314 | - ) | |
| 317 | + .child(player.keymap.chord(action)) | |
| 318 | + })) | |
| 315 | 319 | } |
| 316 | 320 | |
| 317 | 321 | /// The keys overlay (DESIGN §9, §12 step 7): every bound command, sectioned |
| @@ -975,7 +979,7 @@ pub(crate) fn render( | ||
| 975 | 979 | }) |
| 976 | 980 | .when(player.keys_open, |el| el.child(keys_overlay(player))) |
| 977 | 981 | .when(player.settings_open, |el| { |
| 978 | - el.child(settings_stance::render(player, cx)) | |
| 982 | + el.child(settings_stance::render(player, window_size, cx)) | |
| 979 | 983 | }) |
| 980 | 984 | // The two menus (DESIGN §9: "verbs of the thing under the |
| 981 | 985 | // cursor", plate styling, the same scrim-and-row component |
| @@ -988,7 +992,6 @@ pub(crate) fn render( | ||
| 988 | 992 | // -- clip menu, then library menu, then the open list last so |
| 989 | 993 | // it floats over whichever row opened it. |
| 990 | 994 | .children(player.context_card(window_size, cx)) |
| 991 | - .children(player.library_card(window_size, cx)) | |
| 992 | 995 | // The export card and its running-progress sheet, mounted |
| 993 | 996 | // over the whole room exactly as the legacy tree mounts them |
| 994 | 997 | // (`render.rs`) -- the fix for the shipped "Export does |
| @@ -1021,4 +1024,14 @@ pub(crate) fn render( | ||
| 1021 | 1024 | ) |
| 1022 | 1025 | .child(divider(Split::Dock, cx)) |
| 1023 | 1026 | .child(dock(player, dock_w, window_size, cx)) |
| 1027 | + // The library row menu mounts on the ROOT, not inside | |
| 1028 | + // `stance-centre` like the clip menu beside it: it is opened from a | |
| 1029 | + // dock row, so its anchor is a window x past the centre column's own | |
| 1030 | + // right edge, and the dock -- painted after the centre -- covered | |
| 1031 | + // every pixel of it. That is the whole of the shipped "can not | |
| 1032 | + // remove a media from library" defect: the plate was built, placed | |
| 1033 | + // and never visible. Mounted here it paints last, over the dock it | |
| 1034 | + // belongs to, and its own `menu_floor` window coordinates finally | |
| 1035 | + // mean what they say. | |
| 1036 | + .children(player.library_card(window_size, cx)) | |
| 1024 | 1037 | } |
crates/app/src/ui/theme.rsmodified+18 -4
| @@ -1288,11 +1288,25 @@ pub mod darkroom { | ||
| 1288 | 1288 | // -- surfaces ----------------------------------------------------------- |
| 1289 | 1289 | pub const BG_CANVAS: u32 = 0x050607; |
| 1290 | 1290 | pub const BG_PANEL: u32 = 0x0e1013; |
| 1291 | - pub const BG_RAISED: u32 = 0x15181c; | |
| 1291 | + // DESIGN §2's `raised` band (#14171B - #17191D) is the WHOLE interaction | |
| 1292 | + // ladder in this room: a resting raised fill, one step up for hover, one | |
| 1293 | + // more for a picked row -- selection's real mark is the 1px `ink1` ring | |
| 1294 | + // (§4), never a pale flood. | |
| 1295 | + // | |
| 1296 | + // These four used to carry the legacy tree's greys (hover #2A2E33, | |
| 1297 | + // selected #2E3237 -- two and three steps outside the band). Every | |
| 1298 | + // surface that paints a *role* rather than a Darkroom token -- the clip | |
| 1299 | + // menu, the library row menu, the keys overlay, the seven param cards -- | |
| 1300 | + // read them, so each one opened a pale plate in a dim room while the | |
| 1301 | + // handful of surfaces written against `DARK_*`/`INK*` directly looked | |
| 1302 | + // right. That is the whole "some menus belong to old ui" class, and it | |
| 1303 | + // is fixed here, once, rather than by another per-call-site `if | |
| 1304 | + // darkroom` branch: role tokens ARE the theme's job (§2's guard). | |
| 1305 | + pub const BG_RAISED: u32 = 0x14171b; | |
| 1292 | 1306 | pub const BG_TIMELINE: u32 = 0x08090b; |
| 1293 | - pub const BG_HOVER: u32 = 0x2a2e33; | |
| 1294 | - pub const BG_HOVER_DIM: u32 = 0x1c1f24; | |
| 1295 | - pub const BG_SELECTED: u32 = 0x2e3237; | |
| 1307 | + pub const BG_HOVER: u32 = 0x17191d; | |
| 1308 | + pub const BG_HOVER_DIM: u32 = 0x121418; | |
| 1309 | + pub const BG_SELECTED: u32 = 0x1c1f24; | |
| 1296 | 1310 | pub const SCRIM: u32 = 0x050607cc; |
| 1297 | 1311 | pub const SCRIM_LIGHT: u32 = 0x05060755; |
| 1298 | 1312 |