Merge branch 'main' into ui-scrollbar-teardown

This commit is contained in:
MrSubidubi 2025-08-16 00:38:25 +02:00
commit 91cdf69924
83 changed files with 1532 additions and 3929 deletions

View file

@ -5187,26 +5187,22 @@ impl Render for ProjectPanel {
.when(show_indent_guides, |list| {
list.with_decoration(
ui::indent_guides(px(indent_size), IndentGuideColors::panel(cx))
.with_compute_indents_fn(
cx.entity().clone(),
|this, range, window, cx| {
let mut items =
SmallVec::with_capacity(range.end - range.start);
this.iter_visible_entries(
range,
window,
cx,
|entry, _, entries, _, _| {
let (depth, _) =
Self::calculate_depth_and_difference(
entry, entries,
);
items.push(depth);
},
);
items
},
)
.with_compute_indents_fn(cx.entity(), |this, range, window, cx| {
let mut items =
SmallVec::with_capacity(range.end - range.start);
this.iter_visible_entries(
range,
window,
cx,
|entry, _, entries, _, _| {
let (depth, _) = Self::calculate_depth_and_difference(
entry, entries,
);
items.push(depth);
},
);
items
})
.on_click(cx.listener(
|this, active_indent_guide: &IndentGuideLayout, window, cx| {
if window.modifiers().secondary() {
@ -5230,7 +5226,7 @@ impl Render for ProjectPanel {
}
},
))
.with_render_fn(cx.entity().clone(), move |this, params, _, cx| {
.with_render_fn(cx.entity(), move |this, params, _, cx| {
const LEFT_OFFSET: Pixels = px(14.);
const PADDING_Y: Pixels = px(4.);
const HITBOX_OVERDRAW: Pixels = px(3.);
@ -5283,7 +5279,7 @@ impl Render for ProjectPanel {
})
.when(show_sticky_entries, |list| {
let sticky_items = ui::sticky_items(
cx.entity().clone(),
cx.entity(),
|this, range, window, cx| {
let mut items = SmallVec::with_capacity(range.end - range.start);
this.iter_visible_entries(
@ -5310,7 +5306,7 @@ impl Render for ProjectPanel {
list.with_decoration(if show_indent_guides {
sticky_items.with_decoration(
ui::indent_guides(px(indent_size), IndentGuideColors::panel(cx))
.with_render_fn(cx.entity().clone(), move |_, params, _, _| {
.with_render_fn(cx.entity(), move |_, params, _, _| {
const LEFT_OFFSET: Pixels = px(14.);
let indent_size = params.indent_size;