diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index c6d83ef24e498cc85b0280a5d0f1fbc9eed0ed93..379c66df5765af6ded325df600c4e6b8bc805e0c 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -4228,16 +4228,18 @@ impl Editor { ) -> Option { if self.available_code_actions.is_some() { Some( - IconButton::new("code_actions_indicator", ui::Icon::Bolt).on_click(cx.listener( - |editor, e, cx| { + IconButton::new("code_actions_indicator", ui::Icon::Bolt) + .icon_size(IconSize::Small) + .icon_color(Color::Muted) + .selected(is_active) + .on_click(cx.listener(|editor, e, cx| { editor.toggle_code_actions( &ToggleCodeActions { deployed_from_indicator: true, }, cx, ); - }, - )), + })), ) } else { None @@ -4260,11 +4262,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 +4272,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() @@ -9303,7 +9305,7 @@ impl Render for Editor { font_size: rems(0.875).into(), font_weight: FontWeight::NORMAL, font_style: FontStyle::Normal, - line_height: relative(1.).into(), + line_height: relative(settings.buffer_line_height.value()), background_color: None, underline: None, white_space: WhiteSpace::Normal, diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs index a04af377b432967ccf01046e824c027ace7549ec..3af62811211b4e8daabf2abe8b596f7448bde8b3 100644 --- a/crates/editor2/src/element.rs +++ b/crates/editor2/src/element.rs @@ -939,11 +939,11 @@ impl EditorElement { cx, |fold_element_state, cx| { if fold_element_state.is_active() { - gpui::blue() + cx.theme().colors().ghost_element_active } else if fold_bounds.contains(&cx.mouse_position()) { - gpui::black() + cx.theme().colors().ghost_element_hover } else { - gpui::red() + cx.theme().colors().ghost_element_background } }, )