Swap the parameters to IconButton

This commit is contained in:
Marshall Bowers 2023-10-24 11:26:19 +02:00
parent 47f979d457
commit 6a532af1fd
11 changed files with 37 additions and 37 deletions

View file

@ -61,15 +61,15 @@ impl EditorPane {
Toolbar::new()
.left_item(Breadcrumb::new(self.path.clone(), self.symbols.clone()))
.right_items(vec![
IconButton::new(Icon::InlayHint, "toggle_inlay_hints"),
IconButton::<Self>::new(Icon::MagnifyingGlass, "buffer_search")
IconButton::new("toggle_inlay_hints", Icon::InlayHint),
IconButton::<Self>::new("buffer_search", Icon::MagnifyingGlass)
.when(self.is_buffer_search_open, |this| {
this.color(IconColor::Accent)
})
.on_click(|editor, cx| {
editor.toggle_buffer_search(cx);
}),
IconButton::new(Icon::MagicWand, "inline_assist"),
IconButton::new("inline_assist", Icon::MagicWand),
]),
)
.children(Some(self.buffer_search.clone()).filter(|_| self.is_buffer_search_open))