Adjust terminal line spacing and distinguish active pane titles

This commit is contained in:
James Magahern
2026-11-17 18:12:04 -08:00
parent a8cf702d43
commit a388944d73
4 changed files with 38 additions and 33 deletions
+7 -28
View File
@@ -759,23 +759,12 @@ fn stack_headers(entries: &[StackPaneInfo], id: String, client: Option<&Client>)
let pane = entry.id;
let client = client.cloned();
headers = headers.child(
div()
chrome::pane_title_bar(false)
.id(ElementId::Name(format!("collapsed-pane-{pane}").into()))
.h(px(28.))
.flex_shrink_0()
.px(px(9.))
.border_1()
.border_color(rgb(chrome::BORDER))
.bg(rgb(chrome::TERMINAL_BACKGROUND))
.font_family(".SystemUIFont")
.text_size(px(11.))
.text_color(rgb(chrome::PANE_MUTED))
.border_color(rgb(chrome::PANE_INACTIVE_BORDER))
.cursor_pointer()
.hover(|style| {
style
.bg(rgb(chrome::HOVER_BACKGROUND))
.text_color(rgb(chrome::PANE_FOCUS))
})
.hover(|style| style.border_color(rgb(0xbdbdbd)))
.on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation())
.on_click(move |_, _, cx| {
cx.stop_propagation();
@@ -947,21 +936,10 @@ impl TerminalPane {
}
fn pane_header(&mut self, cx: &mut Context<Self>) -> Div {
let mut header = div()
let mut header = chrome::pane_title_bar(self.active)
.flex()
.items_center()
.gap(px(8.))
.h(px(28.))
.flex_shrink_0()
.px(px(9.))
.bg(rgb(chrome::TERMINAL_BACKGROUND))
.font_family(".SystemUIFont")
.text_size(px(11.))
.text_color(rgb(if self.active {
chrome::PANE_FOCUS
} else {
chrome::PANE_MUTED
}))
.on_mouse_down(
MouseButton::Left,
cx.listener(|pane, _, window, cx| {
@@ -983,7 +961,8 @@ impl TerminalPane {
.child(
div()
.flex_shrink_0()
.text_color(rgb(chrome::MUTED))
.text_size(px(11.))
.font_weight(FontWeight::NORMAL)
.child("Enter to save · Esc to cancel"),
);
} else {
@@ -1308,7 +1287,7 @@ impl Render for TerminalPane {
.border_color(rgb(if self.active {
chrome::PANE_FOCUS
} else {
chrome::BORDER
chrome::PANE_INACTIVE_BORDER
}))
.overflow_hidden()
.track_focus(&self.focus)