Toggle sidebar items on mouse down instead of on click

This commit is contained in:
Antonio Scandurra
2021-09-02 10:20:58 +02:00
parent 1d697df1bc
commit 38dc023942
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ impl Sidebar {
.boxed()
})
.with_cursor_style(CursorStyle::PointingHand)
.on_click(move |cx| {
.on_mouse_down(move |cx| {
cx.dispatch_action(ToggleSidebarItem(ToggleArg { side, item_index }))
})
.boxed()