Start work on dragging entries in the project panel
This commit is contained in:
parent
a208229a2c
commit
cbce49ff68
3 changed files with 137 additions and 80 deletions
|
@ -54,6 +54,14 @@ impl ListItem {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn on_drag(
|
||||
mut self,
|
||||
handler: impl Fn(&MouseDownEvent, &mut WindowContext) + 'static,
|
||||
) -> Self {
|
||||
self.on_secondary_mouse_down = Some(Box::new(handler));
|
||||
self
|
||||
}
|
||||
|
||||
pub fn tooltip(mut self, tooltip: impl Fn(&mut WindowContext) -> AnyView + 'static) -> Self {
|
||||
self.tooltip = Some(Box::new(tooltip));
|
||||
self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue