From c62954344a028ac87d18ac7192bc793f8da59674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 9 May 2026 18:40:51 -0400 Subject: [PATCH] Brand glyph + reload control in split pane header Replace the colored accent dot in each split pane header with the host's brand glyph, and add the design's reload control next to the close glyph. The header height bumps from 30 to 32 px so the 16 px glyph sits cleanly between the 11 px lock and host text. --- crates/ely_app/src/shell/chrome/split_pane.rs | 25 ++++++++++++++++--- crates/ely_app/src/shell/splits.rs | 9 +++++-- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/crates/ely_app/src/shell/chrome/split_pane.rs b/crates/ely_app/src/shell/chrome/split_pane.rs index 33d3d5a..03d813a 100644 --- a/crates/ely_app/src/shell/chrome/split_pane.rs +++ b/crates/ely_app/src/shell/chrome/split_pane.rs @@ -7,19 +7,20 @@ use gpui::{ use gpui_component::IconName; use crate::shell::ElyShell; +use crate::shell::chrome::render_glyph_for; pub(crate) fn render_split_pane_header( host: String, path: String, secure: bool, - dot_color: u32, + glyph_initial: String, close_tab_id: TabId, cx: &mut Context, ) -> AnyElement { let lock_or_globe = if secure { IconName::Search } else { IconName::Globe }; div() - .h(px(30.0)) + .h(px(32.0)) .px(px(10.0)) .gap(px(8.0)) .flex() @@ -28,7 +29,7 @@ pub(crate) fn render_split_pane_header( .border_b_1() .border_color(rgb(colors::HAIRLINE)) .bg(rgb(0xf6f4ef)) - .child(div().size(px(8.0)).rounded_full().bg(rgb(dot_color))) + .child(render_glyph_for(Some(host.as_str()), &glyph_initial, 16.0)) .child( div() .text_color(rgb(colors::INK_3)) @@ -37,7 +38,7 @@ pub(crate) fn render_split_pane_header( ) .child( div() - .text_size(px(11.0)) + .text_size(px(11.5)) .font_weight(FontWeight(500.0)) .text_color(rgb(colors::INK)) .child(host), @@ -51,10 +52,26 @@ pub(crate) fn render_split_pane_header( .text_color(rgb(colors::INK_4)) .child(path), ) + .child(render_reload_glyph(close_tab_id.clone(), cx)) .child(render_close_glyph(close_tab_id, cx)) .into_any_element() } +fn render_reload_glyph(tab_id: TabId, cx: &mut Context) -> AnyElement { + let id = format!("split-pane-reload-{}", tab_id.as_str()); + div() + .id(SharedString::from(id)) + .text_color(rgb(colors::INK_4)) + .text_size(px(11.0)) + .cursor_pointer() + .hover(|style| style.text_color(rgb(colors::INK))) + .on_click(cx.listener(move |shell, _, window, cx| { + shell.select_tab(&tab_id, window, cx); + })) + .child(IconName::Redo2) + .into_any_element() +} + fn render_close_glyph(close_tab_id: TabId, cx: &mut Context) -> AnyElement { let id = format!("split-pane-close-{}", close_tab_id.as_str()); div() diff --git a/crates/ely_app/src/shell/splits.rs b/crates/ely_app/src/shell/splits.rs index 14e405d..e5e55b2 100644 --- a/crates/ely_app/src/shell/splits.rs +++ b/crates/ely_app/src/shell/splits.rs @@ -192,7 +192,12 @@ impl ElyShell { let host = pane_host_label(tab); let path = pane_path_label(tab); let secure = pane_url_is_secure(tab); - let dot_color = if active { colors::ACCENT } else { colors::INK_4 }; + let glyph_initial = tab + .title() + .chars() + .next() + .unwrap_or('?') + .to_string(); div() .id(SharedString::from(format!("split-pane-{}", tab.id().as_str()))) @@ -212,7 +217,7 @@ impl ElyShell { .on_click(cx.listener(move |shell, _, window, cx| { shell.select_tab(&tab_id, window, cx); })) - .child(render_split_pane_header(host, path, secure, dot_color, close_tab_id, cx)) + .child(render_split_pane_header(host, path, secure, glyph_initial, close_tab_id, cx)) .child(div().flex_1().min_h_0().overflow_hidden().child(if compact_canvas { render_compact_split_canvas(tab) } else {