Change cursor to grab when node can be dragged

This commit is contained in:
Tom A. Wagner 2021-01-06 10:59:28 +01:00
parent 85b21a920d
commit d5283c803b

View file

@ -1,7 +1,7 @@
use super::graph_view::GraphView;
use pipewire::port::Direction;
use gtk::prelude::*;
use pipewire::port::Direction;
use std::collections::HashMap;
@ -52,6 +52,11 @@ impl Node {
});
result.label.add_controller(&motion_controller);
// Display a grab cursor when the mouse is over the label so the user knows the node can be dragged.
result
.label
.set_cursor(gtk::gdk::Cursor::from_name("grab", None).as_ref());
result.widget.attach(&result.label, 0, 0, 2, 1);
result