diff --git a/crates/trawler/src/editor.rs b/crates/trawler/src/editor.rs index 0dc9eb2..d32bd26 100644 --- a/crates/trawler/src/editor.rs +++ b/crates/trawler/src/editor.rs @@ -1520,7 +1520,7 @@ impl Element for BlockTextElement { cursor_line_box = Some((line_tops[line_ix] + local.y, line_height)); cursor_quad = Some(fill( Bounds::new(point(x, y), size(px(2.), caret_height)), - gpui::blue(), + rgb(crate::THREAD_COLOR), )); } } @@ -1560,7 +1560,10 @@ impl Element for BlockTextElement { point(start_x, row_top), point(end_x, row_top + line_height), ), - rgba(0x3311ff30), + // The thread accent at 25% alpha, so the selection + // highlight stays in the same family as the + // focused-path thread and the caret. + rgba((crate::THREAD_COLOR << 8) | 0x40), )); } } @@ -1728,7 +1731,7 @@ impl Element for BlockTextElement { if focus_handle.is_focused(window) { match prepaint.cursor.take() { Some(CaretPaint::Quad(quad)) => window.paint_quad(quad), - Some(CaretPaint::Path(path)) => window.paint_path(path, gpui::blue()), + Some(CaretPaint::Path(path)) => window.paint_path(path, rgb(crate::THREAD_COLOR)), None => {} } } diff --git a/crates/trawler/src/main.rs b/crates/trawler/src/main.rs index 9e67373..e8b7b46 100644 --- a/crates/trawler/src/main.rs +++ b/crates/trawler/src/main.rs @@ -2429,8 +2429,10 @@ fn is_query_block(outline: &Outline, id: TreeID) -> bool { } /// Reference color: distinct from body text, matching the spec's "visually -/// distinct" requirement for node references. -const REFERENCE_COLOR: u32 = 0x6ab0f3; +/// distinct" requirement for node references. The accent green (see +/// `THREAD_COLOR`) — references are interactive, so they wear the same +/// accent as the rest of the interactive family. +const REFERENCE_COLOR: u32 = THREAD_COLOR; const CODE_BG: u32 = 0x2a2a2a; const MUTED_COLOR: u32 = 0x9a9a9a; /// Default text color, set on the root element and also baked into each @@ -2482,7 +2484,10 @@ const BULLET_COLUMN_CENTER: f32 = 7.0; /// the elbow's `border_l_2`/`border_b_2` calls (gpui's per-side border /// helpers are fixed-step). const THREAD_WIDTH: f32 = 2.0; -const THREAD_COLOR: u32 = 0x7c9dd9; +/// The app's accent: a muted pistachio green. The editor derives its +/// caret and selection-highlight colors from this (see `editor.rs`), so +/// the accent family stays coherent. +const THREAD_COLOR: u32 = 0x8ecc99; /// Corner radius of the thread's elbow bend into a bullet. const THREAD_BEND_RADIUS: f32 = 6.0; @@ -2645,8 +2650,10 @@ fn apply_scroll_target(list_state: &ListState, target: ScrollTarget) { /// and its (indented) result". `QUERY_ACCENT_COLOR` colors the "RESULT" /// label; deliberately not used for a border, which would consume layout /// width sibling rows don't have and throw off alignment. -const QUERY_BG: u32 = 0x22252e; -const QUERY_ACCENT_COLOR: u32 = 0x7c9dd9; +// A recessed neutral — darker than the app background rather than a +// blue-tinted lift, so the card doesn't fight the green accent family. +const QUERY_BG: u32 = 0x181818; +const QUERY_ACCENT_COLOR: u32 = THREAD_COLOR; /// Blank space rendered as a synthetic trailing row after the real outline /// rows, so the last block can be scrolled up away from the window's bottom /// edge instead of staying glued to it while editing. Must stay ≥ the