authoravatarclover caruso<git@paperclover.net>2026-10-16 14:26:40-07:00
committeravatarclover caruso<git@paperclover.net>2026-10-19 16:50:39-07:00
log132fa1379f8ba53b504a5bdda15a9cc58d5f44cd
tree59a3c3ca07a85efe45e4d593a25b63be56e04018
parentc3f000fe161ab495e3e0123a1c79cfc438c1fe72
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

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

1 files changed, 9 insertions(+), 2 deletions(-)

crates/snowbound/src/split.rs+9-2
......@@ -670,10 +670,16 @@ impl State {
670670 node.set_label(format!("{section}, {page}"));
671671 }
672672 let header = format!("{section} · {page}");
673 // The focused pane's header wears its section's accent, which the strip's colour
674 // stands clear of in either appearance.
675 let focused = parked.is_none();
676 let ink = if focused { theme.strip } else { theme.text_dim };
673677 self.ui.open(
674678 "header",
675679 Spec {
676680 size: [fill(), px(ui::shell::TOOL)],
681 fill: focused.then_some(theme.accent),
682 radius: self.rounding(),
677683 ..Spec::default()
678684 },
679685 );
......@@ -683,12 +689,13 @@ impl State {
683689 size: [fill(), px(ui::shell::TOOL)],
684690 text: Some(&header),
685691 overflow: Overflow::Ellipsis,
686 bold: parked.is_none(),
692 bold: focused,
693 color: focused.then_some(ink),
687694 pad: [4.0, 0.0],
688695 ..Spec::default()
689696 },
690697 );
691 let close = ui::shell::tool_button(&mut self.ui, "close", art::CLOSE, theme.text_dim, None);
698 let close = ui::shell::tool_button(&mut self.ui, "close", art::CLOSE, ink, None);
692699 let button = self.ui.id("close");
693700 name(&mut self.ui, button, "Close Pane");
694701 self.ui.close();