From d13c1486dab44094ac29e47a4ff9e1cb74bedc9e Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 15 Dec 2023 12:09:06 -0500 Subject: [PATCH] Update fold_indicator render --- crates/editor2/src/editor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 664d1d7380..3dd703bcba 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -4260,11 +4260,7 @@ impl Editor { fold_data .map(|(fold_status, buffer_row, active)| { (active || gutter_hovered || fold_status == FoldStatus::Folded).then(|| { - let icon = match fold_status { - FoldStatus::Folded => ui::Icon::ChevronRight, - FoldStatus::Foldable => ui::Icon::ChevronDown, - }; - IconButton::new(ix as usize, icon) + IconButton::new(ix as usize, ui::Icon::ChevronDown) .on_click(cx.listener(move |editor, e, cx| match fold_status { FoldStatus::Folded => { editor.unfold_at(&UnfoldAt { buffer_row }, cx); @@ -4274,6 +4270,10 @@ impl Editor { } })) .icon_color(ui::Color::Muted) + .icon_size(ui::IconSize::Small) + .selected(fold_status == FoldStatus::Folded) + .selected_icon(ui::Icon::ChevronRight) + .size(ui::ButtonSize::None) }) }) .flatten()