From 132fa1379f8ba53b504a5bdda15a9cc58d5f44cd Mon Sep 17 00:00:00 2001 From: clover caruso Date: Fri, 16 Oct 2026 14:26:40 -0700 Subject: [PATCH] fix: show which split pane has the focus While the page area is split, the focused pane's header now wears its section's accent with its name in the strip's colour, so the pane the toolbar and keys act on shows at a glance; the others keep plain headers on the frame. Only replays split the page area yet. Assisted-by: claude-opus-5.5 --- crates/snowbound/src/split.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/snowbound/src/split.rs b/crates/snowbound/src/split.rs index b5f9f5ed194fb91c1f12a1abbaac632990a40540..42ebec0c67cec43cbdc31df2d3350872ce2fcdbf 100644 --- a/crates/snowbound/src/split.rs +++ b/crates/snowbound/src/split.rs @@ -670,10 +670,16 @@ impl State { node.set_label(format!("{section}, {page}")); } let header = format!("{section} ยท {page}"); + // The focused pane's header wears its section's accent, which the strip's colour + // stands clear of in either appearance. + let focused = parked.is_none(); + let ink = if focused { theme.strip } else { theme.text_dim }; self.ui.open( "header", Spec { size: [fill(), px(ui::shell::TOOL)], + fill: focused.then_some(theme.accent), + radius: self.rounding(), ..Spec::default() }, ); @@ -683,12 +689,13 @@ impl State { size: [fill(), px(ui::shell::TOOL)], text: Some(&header), overflow: Overflow::Ellipsis, - bold: parked.is_none(), + bold: focused, + color: focused.then_some(ink), pad: [4.0, 0.0], ..Spec::default() }, ); - let close = ui::shell::tool_button(&mut self.ui, "close", art::CLOSE, theme.text_dim, None); + let close = ui::shell::tool_button(&mut self.ui, "close", art::CLOSE, ink, None); let button = self.ui.id("close"); name(&mut self.ui, button, "Close Pane"); self.ui.close(); -- 2.54.1