diff --git a/README.md b/README.md index 0bc0ca6..23defc0 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,8 @@ expressions use the same VM and globals dictionary across submissions. There is Expression/Script selector. The current prompt, submitted commands and results share one scrollable surface, with no separate input box, editor splitter or Run toolbar. Typing appears at the prompt immediately; Enter executes it and the result -appears directly below. Shift-Enter inserts a newline. Input focus uses a text caret, +appears directly below. Shift-Enter inserts a newline. Each command and its result +are followed by a thin neutral horizontal separator. Input focus uses a text caret, without a blue field border or hover fill. The prompt, history and caret share the same scroll offset; typing and cursor navigation reveal the current insertion point. Create objects with bare assignment or `let`, then render them when ready: diff --git a/src/developer_tools.rs b/src/developer_tools.rs index ebae3ec..e77b831 100644 --- a/src/developer_tools.rs +++ b/src/developer_tools.rs @@ -794,8 +794,14 @@ impl Painter { let count = (area.height / ROW).ceil() as usize + 2; for (i, line) in lines.iter().enumerate().skip(first).take(count) { let y = area.y + 5.0 + i as f32 * ROW - s.y; - if line.divider { - self.fill(Rect::new(area.x, y, area.width, 1.0), self.ui.theme.accent); + if let Some(divider) = line.divider { + self.fill( + Rect::new(area.x, y, area.width, 1.0), + match divider { + Divider::Accent => self.ui.theme.accent, + Divider::Neutral => BORDER, + }, + ); } let paint = Rect::new(area.x, y, area.width, ROW); if let Some(action) = &line.action { @@ -855,16 +861,21 @@ impl Painter { struct Line { value: String, color: Color, - divider: bool, + divider: Option, selected: bool, action: Option, } +#[derive(Clone, Copy)] +enum Divider { + Accent, + Neutral, +} impl Line { fn new(value: impl Into, color: Color) -> Self { Self { value: value.into(), color, - divider: false, + divider: None, selected: false, action: None, } @@ -1059,7 +1070,7 @@ pub fn build( format!("#{} {} {} {}", r.id, r.timestamp, r.origin, kind), MUTED, ); - title.divider = true; + title.divider = Some(Divider::Accent); title.action = Some(Action::Request(r.id)); lines.push(title); } @@ -1085,7 +1096,9 @@ pub fn build( } else { lines.push(Line::new(" Executing…", MUTED)); } - lines.push(Line::new("", MUTED)); + let mut separator = Line::new("", MUTED); + separator.divider = Some(Divider::Neutral); + lines.push(separator); } if lines.is_empty() { multiline( @@ -1585,7 +1598,7 @@ fn request_details(out: &mut Vec, r: &Exchange) { ] { out.push(Line::new("", MUTED)); let mut l = Line::new(title, MUTED); - l.divider = true; + l.divider = Some(Divider::Accent); out.push(l); multiline( out,