mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-16 15:11:25 +00:00
Update size of code action indicator and show when active
This commit is contained in:
parent
83525bf142
commit
4cb0f60779
1 changed files with 6 additions and 4 deletions
|
@ -4228,16 +4228,18 @@ impl Editor {
|
||||||
) -> Option<IconButton> {
|
) -> Option<IconButton> {
|
||||||
if self.available_code_actions.is_some() {
|
if self.available_code_actions.is_some() {
|
||||||
Some(
|
Some(
|
||||||
IconButton::new("code_actions_indicator", ui::Icon::Bolt).on_click(cx.listener(
|
IconButton::new("code_actions_indicator", ui::Icon::Bolt)
|
||||||
|editor, e, cx| {
|
.icon_size(IconSize::Small)
|
||||||
|
.icon_color(Color::Muted)
|
||||||
|
.selected(is_active)
|
||||||
|
.on_click(cx.listener(|editor, e, cx| {
|
||||||
editor.toggle_code_actions(
|
editor.toggle_code_actions(
|
||||||
&ToggleCodeActions {
|
&ToggleCodeActions {
|
||||||
deployed_from_indicator: true,
|
deployed_from_indicator: true,
|
||||||
},
|
},
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
},
|
})),
|
||||||
)),
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in a new issue