Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Update size of code action indicator and show when active

Nate Butler4cb0f60779d5
diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs
index fc03150fb60..e1e4c7e0adb 100644
--- a/crates/editor2/src/editor.rs
+++ b/crates/editor2/src/editor.rs
@@ -4228,16 +4228,18 @@ impl Editor {
) -> Option<IconButton> {
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