Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
sidebar: Improve subheader component (#49074)
Danilo Leal500f87da88bf
diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rsindex 2fb58a7f66a..e1d32bd5735 100644--- a/crates/sidebar/src/sidebar.rs+++ b/crates/sidebar/src/sidebar.rs@@ -17,7 +17,7 @@ use std::path::{Path, PathBuf};use std::sync::Arc;use theme::ActiveTheme;use ui::utils::TRAFFIC_LIGHT_PADDING;-use ui::{Divider, KeyBinding, ListItem, Tab, ThreadItem, Tooltip, prelude::*};+use ui::{Divider, DividerColor, KeyBinding, ListSubHeader, Tab, ThreadItem, Tooltip, prelude::*};use ui_input::ErasedEditor;use util::ResultExt as _;use workspace::{@@ -519,18 +519,13 @@ impl PickerDelegate for WorkspacePickerDelegate {match entry {SidebarEntry::Separator(title) => Some(- div()- .px_0p5()- .when(index > 0, |this| this.mt_1().child(Divider::horizontal()))- .child(- ListItem::new("section_header").selectable(false).child(- Label::new(title.clone())- .size(LabelSize::XSmall)- .color(Color::Muted)- .when(index > 0, |this| this.mt_1p5())- .mb_1(),- ),- )+ v_flex()+ .when(index > 0, |this| {+ this.mt_1()+ .gap_2()+ .child(Divider::horizontal().color(DividerColor::BorderFaded))+ })+ .child(ListSubHeader::new(title.clone()).inset(true)).into_any_element(),),SidebarEntry::WorkspaceThread(thread_entry) => {