diff --git a/crates/app/src/keymap.rs b/crates/app/src/keymap.rs index 8cd69ec..3986046 100644 --- a/crates/app/src/keymap.rs +++ b/crates/app/src/keymap.rs @@ -221,6 +221,12 @@ actions! { /// this window is EDITOR." Always answerable, same as `Theme`: it is /// about the editor and the project's own numbers, not about a clip. Settings, + /// Moves the keyboard ring onto the dock (`ui::stance::Surface::Dock`, + /// the cycle's first stop): the door into keyboard-only navigation + /// (`ui::stance`'s Tab/Shift-Tab ring), which nothing else in the app + /// opens. Bare Tab stays [`ActionId::Select`] at the root the whole time + /// -- this only starts the ring, it never steals the clip-selection key. + FocusPanels, } impl ActionId { @@ -303,6 +309,7 @@ impl ActionId { ActionId::Screenshot => "Save the frame on screen as a PNG", ActionId::SubtitleStyle => "Subtitle style: font and size…", ActionId::Settings => "Settings: project and editor…", + ActionId::FocusPanels => "Move keyboard focus between panels", } } @@ -383,6 +390,7 @@ impl ActionId { ActionId::Screenshot => "screenshot", ActionId::SubtitleStyle => "subtitle-style", ActionId::Settings => "settings", + ActionId::FocusPanels => "focus-panels", } } @@ -467,7 +475,11 @@ impl ActionId { | ActionId::Fullscreen // The settings page: it changes no clip and no lane, only the // project's own numbers and this window's preferences. - | ActionId::Settings => Category::View, + | ActionId::Settings + // Moves the ring, not a clip or a lane: the same "how one is + // looking/reaching, not what is being edited" shape as the rest + // of this heading. + | ActionId::FocusPanels => Category::View, ActionId::Cut | ActionId::Regroup | ActionId::Detach @@ -1232,6 +1244,13 @@ impl Keymap { // bare "," is WalkCutPrev, and nothing else answers to the // ctrl chord. b(ActionId::Settings, ",", true), + // The standard pane-cycle key on every desktop that has one + // (browsers, IDEs) -- free here, and Tab itself cannot spell + // this: bare Tab is already [`ActionId::Select`] at the root + // (a bare-key rebind would steal clip selection), and its + // shift pair is unspellable in this table's chord (`ctrl` + // only, see [`ActionId::Select`]'s own comment above). + b(ActionId::FocusPanels, "f6", false), ], } } @@ -1510,7 +1529,7 @@ mod tests { #[test] fn every_default_stroke_reaches_its_action() { let k = Keymap::defaults(); - assert_eq!(k.entries().len(), 75); + assert_eq!(k.entries().len(), 76); // The cut odometer: bare walks one, `<`/`>` (what shift+,/shift+. // actually type) strides ten. assert_eq!(k.lookup(".", false), Some(ActionId::WalkCutNext)); diff --git a/crates/app/src/main.rs b/crates/app/src/main.rs index c6e7441..975f35c 100644 --- a/crates/app/src/main.rs +++ b/crates/app/src/main.rs @@ -776,6 +776,12 @@ struct Player { /// Wall clock of the first displayed frame -- the real-speed measurement. started: Option, focus: FocusHandle, + /// The three focus-ring surfaces (`ui::stance::Surface`) Tab/Shift-Tab + /// cycles between once one of them holds focus -- `focus` above stays + /// the fallback none of these keys ever leave. + focus_dock: FocusHandle, + focus_bench: FocusHandle, + focus_inspector: FocusHandle, } #[cfg(test)] @@ -1057,6 +1063,9 @@ fn main() { dropped: 0, started: None, focus: cx.focus_handle(), + focus_dock: cx.focus_handle(), + focus_bench: cx.focus_handle(), + focus_inspector: cx.focus_handle(), }); // Nothing else takes focus, and without it the key listener // above is never reached. diff --git a/crates/app/src/oracle.rs b/crates/app/src/oracle.rs index 2f69371..127573d 100644 --- a/crates/app/src/oracle.rs +++ b/crates/app/src/oracle.rs @@ -110,6 +110,10 @@ pub(crate) fn enable(action: ActionId, ctx: Ctx) -> Enable { if action == ActionId::Theme || action == ActionId::Fullscreen || action == ActionId::SubtitleStyle + // Moving the keyboard ring is the same kind of always-there, + // touches-no-timeline action as the three above: there is always a + // dock/bench/inspector to land the ring on, export or no. + || action == ActionId::FocusPanels { return Enable::Yes; } diff --git a/crates/app/src/player/actions.rs b/crates/app/src/player/actions.rs index 84c29a1..0341bc5 100644 --- a/crates/app/src/player/actions.rs +++ b/crates/app/src/player/actions.rs @@ -165,6 +165,16 @@ impl Player { window.toggle_fullscreen(); } } + // The ring's own door: nothing else in the app ever calls + // `window.focus` on one of the three surface handles + // (`ui::stance::Surface`), so without this the Tab handlers those + // surfaces carry (`stance.rs`'s `bench`, `dock_stance.rs`'s + // `cycle_on_key_down`) are unreachable dead code -- the ring never + // starts. Lands on the cycle's first stop (`stance::SURFACE_CYCLE` + // -- the dock); a second Tab from there walks it same as ever. + ActionId::FocusPanels => { + self.focus_surface(crate::ui::stance::Surface::Dock, window, cx); + } // Nothing to cancel while nothing is exporting; the export guard in // the key handler is what answers this one while there is. ActionId::CancelExport => {} diff --git a/crates/app/src/tests/editing.rs b/crates/app/src/tests/editing.rs index 162ce27..a3fa040 100644 --- a/crates/app/src/tests/editing.rs +++ b/crates/app/src/tests/editing.rs @@ -924,7 +924,10 @@ fn the_clip_menu_dims_what_the_playhead_is_not_on_and_stays_in_the_window() { let allowed = action == ActionId::CancelExport || action == ActionId::Theme || action == ActionId::Fullscreen - || action == ActionId::SubtitleStyle; + || action == ActionId::SubtitleStyle + // Moving the ring touches no edit list either -- same kind of + // thing as Fullscreen right above it. + || action == ActionId::FocusPanels; assert_eq!( whole(action, busy).yes(), allowed, diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index 6c8cd71..e297058 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -2664,6 +2664,12 @@ fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { ), (ActionId::Crossfade, "fade parity owns crossfade controls"), (ActionId::Dissolve, "fade parity owns dissolve controls"), + ( + ActionId::FocusPanels, + "keyboard-only by design: a mouse already focuses whatever it \ + clicks, so a click-through door for \"move keyboard focus\" \ + has nothing to do that a click has not already done", + ), ( ActionId::Deselect, "clicking empty timeline space already clears the selection with the mouse; \ diff --git a/crates/app/src/tests/view.rs b/crates/app/src/tests/view.rs index d34f3e4..b08c1a3 100644 --- a/crates/app/src/tests/view.rs +++ b/crates/app/src/tests/view.rs @@ -891,3 +891,93 @@ fn the_zoom_button_says_how_much_is_on_the_bed() { assert_eq!(secs_label(1. / 60.), "0.02s"); assert_eq!(secs_label(4.5), "4.5s"); } + +/// Keyboard focus v1 (`ui::stance::{Surface, next_surface, is_focus_cycle_key}`): +/// Tab walks dock -> bench -> inspector -> dock, wrapping; Shift-Tab walks +/// it backward. No gpui window harness exists in this crate to drive a real +/// `KeyDownEvent` through -- this exercises the exact pure function every +/// surface's `on_key_down` calls, which is where the cycle order actually +/// lives. +#[test] +fn tab_cycles_dock_bench_inspector_and_wraps() { + use crate::ui::stance::{Surface, next_surface}; + + assert_eq!(next_surface(Surface::Dock, false), Surface::Bench); + assert_eq!(next_surface(Surface::Bench, false), Surface::Inspector); + assert_eq!(next_surface(Surface::Inspector, false), Surface::Dock); + + // Shift-Tab is the exact reverse at every step. + assert_eq!(next_surface(Surface::Dock, true), Surface::Inspector); + assert_eq!(next_surface(Surface::Inspector, true), Surface::Bench); + assert_eq!(next_surface(Surface::Bench, true), Surface::Dock); +} + +/// The defect this closes: the dock mounts only one of its two tabs at a +/// time (`dock_stance::render`'s `match src_active`), so focusing +/// `focus_dock`/`focus_inspector` while the other tab is showing lands on a +/// handle with no tree node -- gpui then dispatches no key listener at all, +/// keyboard input is dead until a mouse click. `Player::focus_surface` +/// (`ui::stance.rs`) flips the tab first via this pure decision so the +/// surface being entered is always the one mounted. +#[test] +fn surface_wants_src_active_mounts_the_tab_before_focus_lands_on_it() { + use crate::ui::stance::{Surface, surface_wants_src_active}; + + assert_eq!(surface_wants_src_active(Surface::Dock), Some(true)); + assert_eq!(surface_wants_src_active(Surface::Inspector), Some(false)); + // Bench has no dock tab of its own -- entering it must not disturb + // whichever tab the dock was last left on. + assert_eq!(surface_wants_src_active(Surface::Bench), None); +} + +/// The root fallback guarantee (main.rs:1054's "every keybind hangs off the +/// root FocusHandle"): a surface's own `on_key_down` answers Tab/Shift-Tab +/// and nothing else -- `cx.stop_propagation()` is only ever reached from +/// that one branch (`ui::stance::is_focus_cycle_key`), so every other key, +/// still-pressed while a surface is focused, is left un-stopped and bubbles +/// up the dispatch tree to the root's own `on_key_down` +/// (gpui-0.2.2 `window.rs`'s `dispatch_key_down_up_event`, `Bubble` phase, +/// walks the focused node's ancestors and stops only at +/// `cx.stop_propagation()` -- verified by reading that function, not +/// assumed). This asserts the gate itself: only "tab" is ever intercepted, +/// so a keybind like space (play/pause) or "s" (split) is provably never +/// swallowed by a focused surface. +#[test] +fn only_tab_is_intercepted_by_a_focused_surface_everything_else_reaches_root() { + use crate::ui::stance::is_focus_cycle_key; + + assert!(is_focus_cycle_key("tab")); + for key in ["space", "escape", "s", "c", "left", "right", "enter", "delete", "?"] { + assert!(!is_focus_cycle_key(key), "{key} must bubble to the root"); + } +} + +/// The ring's other door, escape: [`ui::stance::is_focus_exit_key`] is the +/// one branch a focused surface's `on_key_down` calls to hand focus back to +/// the root (`Player::focus`) instead of letting escape bubble there on its +/// own -- same pure-function-level check as the Tab gate above, since this +/// crate has no window harness to drive a real `KeyDownEvent` through. +#[test] +fn escape_is_the_only_key_a_focused_surface_uses_to_leave_the_ring() { + use crate::ui::stance::is_focus_exit_key; + + assert!(is_focus_exit_key("escape")); + for key in ["tab", "space", "s", "c", "left", "right", "enter", "delete", "?"] { + assert!(!is_focus_exit_key(key), "{key} must not exit the ring"); + } +} + +/// [`ActionId::FocusPanels`] is what starts the ring in the first place +/// (`Player::act`'s `window.focus(&self.focus_dock)`) -- without a bound key +/// reaching it, `next_surface`/`is_focus_cycle_key` above are unreachable +/// dead code, exactly the defect this action closes. +#[test] +fn focus_panels_is_bound_and_lands_on_the_dock() { + use keymap::{ActionId, Keymap}; + + let k = Keymap::defaults(); + assert_eq!(k.lookup("f6", false), Some(ActionId::FocusPanels)); + // Bare Tab must still mean Select at the root -- FocusPanels must not + // have stolen it. + assert_eq!(k.lookup("tab", false), Some(ActionId::Select)); +} diff --git a/crates/app/src/ui/dock_stance.rs b/crates/app/src/ui/dock_stance.rs index 4c00277..ba91522 100644 --- a/crates/app/src/ui/dock_stance.rs +++ b/crates/app/src/ui/dock_stance.rs @@ -12,6 +12,7 @@ //! [`clip_middle`]...), only the anatomy around them is new. use crate::ui::hitmap; +use crate::ui::stance::{Surface, is_focus_cycle_key, is_focus_exit_key, next_surface}; use crate::ui::type_scale::{self, Typeset, head, label, mono}; use crate::*; use gpui::FontWeight; @@ -817,7 +818,12 @@ fn subtitle_palette(player: &Player, cx: &mut Context) -> Option) -> impl IntoElement { +fn sources_tab( + player: &Player, + window: &mut Window, + cx: &mut Context, +) -> impl IntoElement { + let focused = player.focus_dock.is_focused(window); let sources = player .session .as_ref() @@ -862,6 +868,11 @@ fn sources_tab(player: &Player, cx: &mut Context) -> impl IntoElement { let filter_text: SharedString = player.dock_filter.clone().into(); div() .id("dock-sources") + .track_focus(&player.focus_dock) + .on_key_down(cx.listener(move |this, event: &KeyDownEvent, window, cx| { + cycle_on_key_down(Surface::Dock)(this, event, window, cx) + })) + .when(focused, |d| d.border_1().border_color(rgb(STROKE_FOCUS()))) .flex_1() .min_h(px(0.)) .flex() @@ -1077,8 +1088,10 @@ fn clip_tab( player: &Player, width: f32, window_size: Size, + window: &mut Window, cx: &mut Context, ) -> impl IntoElement { + let focused = player.focus_inspector.is_focused(window); // The room actually given here, not the window's: `eq_card_w`/ // `card_max_w` are asked "how wide may I draw" and answered with the // *whole viewport's* width when handed `window_size` verbatim -- but this @@ -1099,6 +1112,11 @@ fn clip_tab( && !player.subtitle_style_open; div() .id("dock-clip") + .track_focus(&player.focus_inspector) + .on_key_down(cx.listener(move |this, event: &KeyDownEvent, window, cx| { + cycle_on_key_down(Surface::Inspector)(this, event, window, cx) + })) + .when(focused, |d| d.border_1().border_color(rgb(STROKE_FOCUS()))) .flex_1() .min_h(px(0.)) .flex() @@ -1257,6 +1275,7 @@ pub(crate) fn render( player: &Player, width: f32, window_size: Size, + window: &mut Window, cx: &mut Context, ) -> impl IntoElement { let src_active = player.dock_src_active; @@ -1279,7 +1298,33 @@ pub(crate) fn render( .child(dock_tab("dock-tab-clip", "CLIP", !src_active, cx)), ) .child(match src_active { - true => sources_tab(player, cx).into_any_element(), - false => clip_tab(player, width, window_size, cx).into_any_element(), + true => sources_tab(player, window, cx).into_any_element(), + false => clip_tab(player, width, window_size, window, cx).into_any_element(), }) } + +/// The Tab/Shift-Tab handler shared by the dock's two tabs (`sources_tab`'s +/// "dock/library" and `clip_tab`'s "inspector") -- only [`is_focus_cycle_key`] +/// is ever answered here; every other key is left un-stopped so it bubbles +/// to the room's root handler (`ui::stance::render`'s `on_key_down`), which +/// is the one every other keybind, Tab included when nothing in the ring +/// has focus yet, still hangs off. +fn cycle_on_key_down( + surface: Surface, +) -> impl Fn(&mut Player, &KeyDownEvent, &mut Window, &mut Context) + 'static { + move |this, event, window, cx| { + let key = event.keystroke.key.as_str(); + if is_focus_cycle_key(key) { + let next = next_surface(surface, event.keystroke.modifiers.shift); + this.focus_surface(next, window, cx); + cx.stop_propagation(); + } else if is_focus_exit_key(key) { + // Same exit as `stance.rs`'s bench handler: leaves the ring for + // the root handle rather than letting escape bubble to whatever + // the root does with it. + window.focus(&this.focus); + cx.stop_propagation(); + cx.notify(); + } + } +} diff --git a/crates/app/src/ui/stance.rs b/crates/app/src/ui/stance.rs index f509be9..97d769f 100644 --- a/crates/app/src/ui/stance.rs +++ b/crates/app/src/ui/stance.rs @@ -17,6 +17,103 @@ use crate::ui::timeband_stance; use crate::ui::type_scale::{self, Typeset}; use crate::*; +/// Keyboard focus v1: the three regions Tab/Shift-Tab cycle a painted ring +/// through -- the bench, the dock's Sources tab (library) and the dock's +/// Clip tab (inspector), the darkroom's own stand-ins for "timeline", +/// "library" and "inspector" (there is no separate inspector *region* in +/// this tree -- MOCK-SPEC's Clip tab, `dock_stance::clip_tab`, is it). +/// `Player::focus` (the root handle every keybind hangs off) is not a +/// member: Tab already means "select the clip under the playhead" +/// (`ActionId::Select`, `keymap.rs`) at the root, unchanged here, and only +/// starts meaning "enter the ring" once one of these three already holds +/// focus. +#[derive(Clone, Copy, PartialEq, Eq, Debug)] +pub(crate) enum Surface { + Dock, + Bench, + Inspector, +} + +/// Fixed cycle order: dock, bench, inspector. +const SURFACE_CYCLE: [Surface; 3] = [Surface::Dock, Surface::Bench, Surface::Inspector]; + +/// Tab (`backward` false) or Shift-Tab (`backward` true) from `current`, +/// wrapping at either end of [`SURFACE_CYCLE`]. +pub(crate) fn next_surface(current: Surface, backward: bool) -> Surface { + let i = SURFACE_CYCLE.iter().position(|&s| s == current).unwrap(); + let n = SURFACE_CYCLE.len(); + SURFACE_CYCLE[if backward { (i + n - 1) % n } else { (i + 1) % n }] +} + +/// The one key a surface's own `on_key_down` answers. Everything else is +/// left alone on purpose, unhandled and un-stopped, so it bubbles to the +/// root's fallback handler exactly as an unfocused key already does +/// (`window.rs`'s key dispatch walks the focused node's ancestors in +/// `Bubble` phase and stops only at `cx.stop_propagation()` -- the three +/// surface handlers call that solely from this branch, gpui-0.2.2 +/// `window.rs:3897-3906`). +pub(crate) fn is_focus_cycle_key(key: &str) -> bool { + key == "tab" +} + +/// The other key a surface's own `on_key_down` answers: leaves the ring for +/// the root handle (`Player::focus`) rather than letting the stroke bubble +/// there itself -- same one-door reason as [`is_focus_cycle_key`], so the +/// bench and both dock tabs cannot answer "what closes the ring" two +/// different ways. +pub(crate) fn is_focus_exit_key(key: &str) -> bool { + key == "escape" +} + +/// The dock mounts only one of its two tabs at a time +/// (`dock_stance::render`'s `match src_active`), so `focus_dock` only has a +/// tree node under Sources and `focus_inspector` only under Clip -- focusing +/// the unmounted one leaves gpui with a focused handle no node answers to, +/// and every key dies until the next mouse click. Answers "does entering +/// `surface` require flipping the dock tab first", pure so it's testable +/// without a `Window`: `Some(true)`/`Some(false)` is the `dock_src_active` +/// the surface needs mounted, `None` (bench) means leave the tab alone. +pub(crate) fn surface_wants_src_active(surface: Surface) -> Option { + match surface { + Surface::Dock => Some(true), + Surface::Inspector => Some(false), + Surface::Bench => None, + } +} + +impl Player { + /// The `FocusHandle` a [`Surface`] paints its ring on and Tab/Shift-Tab + /// moves to next -- one door, so `next_surface`'s answer and the handle + /// `window.focus` is given cannot name two different surfaces. + pub(crate) fn focus_handle(&self, surface: Surface) -> &FocusHandle { + match surface { + Surface::Dock => &self.focus_dock, + Surface::Bench => &self.focus_bench, + Surface::Inspector => &self.focus_inspector, + } + } + + /// One door onto every ring move: flips the dock tab first + /// ([`surface_wants_src_active`]) so `surface`'s handle is always + /// mounted before `window.focus` lands on it, then persists the flip + /// exactly as the tab's own click does (`dock_stance::dock_tab`'s + /// `on_click`), so the ring and a mouse click can't disagree about + /// which tab was last chosen. + pub(crate) fn focus_surface( + &mut self, + surface: Surface, + window: &mut Window, + cx: &mut Context, + ) { + if let Some(src_active) = surface_wants_src_active(surface) { + self.dock_src_active = src_active; + crate::ui::dock_stance::save(src_active); + } + window.focus(self.focus_handle(surface)); + cx.notify(); + } +} + /// Left rail, full height (DESIGN §5). pub(crate) const SPINE_W: f32 = 56.; /// Fixed strip under the screen: timecode, transport, cut readout, contact @@ -533,9 +630,33 @@ fn time_band(player: &mut Player, position: f64, cx: &mut Context) -> im /// Height comes from [`Player::split_px`] now, not the fixed [`BENCH_H`]: /// the seam [`crate::ui::stance::render`] mounts above this region is what /// answers "ui fields are not stretchable" for the bench. -fn bench(player: &mut Player, bench_h: f32, cx: &mut Context) -> impl IntoElement { +fn bench( + player: &mut Player, + bench_h: f32, + window: &mut Window, + cx: &mut Context, +) -> impl IntoElement { + let focused = player.focus_bench.is_focused(window); div() .id("stance-bench") + .track_focus(&player.focus_bench) + .on_key_down(cx.listener(|this, event: &KeyDownEvent, window, cx| { + let key = event.keystroke.key.as_str(); + if is_focus_cycle_key(key) { + let next = next_surface(Surface::Bench, event.keystroke.modifiers.shift); + this.focus_surface(next, window, cx); + cx.stop_propagation(); + } else if is_focus_exit_key(key) { + // Leaves the ring rather than deleting it: the root handle + // gets focus back, and a second escape there is what does + // whatever escape means at the root (nothing, today) -- + // this must not itself bubble, or the root's own handler + // never sees a stroke that stayed a ring exit. + window.focus(&this.focus); + cx.stop_propagation(); + cx.notify(); + } + })) .flex_none() .h(px(bench_h)) // §4: lanes take 0 radius. @@ -543,6 +664,12 @@ fn bench(player: &mut Player, bench_h: f32, cx: &mut Context) -> impl In .bg(rgb(DARK_CANVAS())) .border_t_1() .border_color(rgba(DARK_SEAM())) + // The ring (DESIGN §4's "1px, lamp-adjacent" convention -- the same + // `.border_1().border_color(...)` a picked bench clip already uses): + // painted on this outer frame, never on a row, and only while this + // surface itself -- not a picked clip inside it -- holds the focus + // ring Tab/Shift-Tab moves ([`next_surface`]). + .when(focused, |d| d.border_1().border_color(rgb(STROKE_FOCUS()))) .flex() .flex_col() .px(px(12.)) @@ -739,6 +866,7 @@ fn dock( player: &Player, dock_w: f32, window_size: Size, + window: &mut Window, cx: &mut Context, ) -> impl IntoElement { div() @@ -751,7 +879,7 @@ fn dock( .border_color(rgba(DARK_SEAM())) .flex() .flex_col() - .child(dock_stance::render(player, dock_w, window_size, cx)) + .child(dock_stance::render(player, dock_w, window_size, window, cx)) } /// A zero-size element whose only job is `window.on_mouse_event`'s door: @@ -982,7 +1110,7 @@ pub(crate) fn render( .child(screen(player, position, window, cx)) .child(time_band(player, position, cx)) .child(divider(Split::Bench, cx)) - .child(bench(player, bench_h, cx)) + .child(bench(player, bench_h, window, cx)) .child(ledger(player, position)) .when_some(player.notices.back().cloned(), |el, n| { el.child(notice_plate(n, bench_h)) @@ -1033,7 +1161,7 @@ pub(crate) fn render( }), ) .child(divider(Split::Dock, cx)) - .child(dock(player, dock_w, window_size, cx)) + .child(dock(player, dock_w, window_size, window, cx)) // The library row menu mounts on the ROOT, not inside // `stance-centre` like the clip menu beside it: it is opened from a // dock row, so its anchor is a window x past the centre column's own diff --git a/crates/app/src/ui/theme.rs b/crates/app/src/ui/theme.rs index 5c31115..c5360ac 100644 --- a/crates/app/src/ui/theme.rs +++ b/crates/app/src/ui/theme.rs @@ -105,6 +105,7 @@ palette! { SCRIM: u32, SCRIM_LIGHT: u32, STROKE_DIVIDER: u32, + STROKE_FOCUS: u32, STROKE_SELECTED: u32, FG_PRIMARY: u32, FG_SECONDARY: u32, @@ -348,6 +349,7 @@ pub mod cool { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x2a3442; + pub const STROKE_FOCUS: u32 = 0xffd166; pub const STROKE_SELECTED: u32 = 0x22d3ee; // -- text ------------------------------------------------------------------- @@ -439,6 +441,7 @@ pub mod warm { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x3a322e; + pub const STROKE_FOCUS: u32 = 0xffc38a; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -523,6 +526,7 @@ pub mod forest { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x25362c; + pub const STROKE_FOCUS: u32 = 0xffd166; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -606,6 +610,7 @@ pub mod violet { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x2e3150; + pub const STROKE_FOCUS: u32 = 0xfde68a; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -684,6 +689,7 @@ pub mod rose { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x332f33; + pub const STROKE_FOCUS: u32 = 0xfcd34d; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -764,6 +770,7 @@ pub mod amber { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x35352f; + pub const STROKE_FOCUS: u32 = 0x7dd3fc; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -842,6 +849,7 @@ pub mod ocean { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x1e2d42; + pub const STROKE_FOCUS: u32 = 0xffd166; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -921,6 +929,7 @@ pub mod ice { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x223140; + pub const STROKE_FOCUS: u32 = 0xfcd34d; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -998,6 +1007,7 @@ pub mod orchid { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x33203f; + pub const STROKE_FOCUS: u32 = 0x7dd3fc; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -1084,6 +1094,7 @@ pub mod nord { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x434c5e; + pub const STROKE_FOCUS: u32 = 0xd08770; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -1173,6 +1184,7 @@ pub mod gruvbox { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x504945; + pub const STROKE_FOCUS: u32 = 0x83a598; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -1253,6 +1265,7 @@ pub mod dracula { // -- strokes ---------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x44475a; + pub const STROKE_FOCUS: u32 = 0x8be9fd; pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; // -- text ------------------------------------------------------------------- @@ -1348,6 +1361,7 @@ pub mod darkroom { // -- strokes -------------------------------------------------------------- pub const STROKE_DIVIDER: u32 = 0x22262b; + pub const STROKE_FOCUS: u32 = INK1; /// "Focus/selection ring = 1px ink1 (lamp-adjacent, not coloured)." pub const STROKE_SELECTED: u32 = INK1;