Added a dragging cursor
This commit is contained in:
parent
cb13f5f74c
commit
355da88630
2 changed files with 21 additions and 6 deletions
|
|
@ -179,12 +179,7 @@ bool TimelineHeaderContainer::on_button_press_event (
|
||||||
bool TimelineHeaderContainer::on_button_release_event (
|
bool TimelineHeaderContainer::on_button_release_event (
|
||||||
GdkEventButton* event)
|
GdkEventButton* event)
|
||||||
{
|
{
|
||||||
TimelineLayoutHelper &layout = timelineWidget.layoutHelper;
|
end_drag();
|
||||||
|
|
||||||
// Has the user been dragging?
|
|
||||||
if(layout.get_dragging_track())
|
|
||||||
layout.end_dragging_track();
|
|
||||||
|
|
||||||
return Container::on_button_release_event(event);
|
return Container::on_button_release_event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -409,6 +404,24 @@ TimelineHeaderContainer::begin_drag()
|
||||||
// Raise all the header widgets so they float above the widgets not
|
// Raise all the header widgets so they float above the widgets not
|
||||||
// being dragged
|
// being dragged
|
||||||
raise_recursive(layout.get_dragging_track_iter());
|
raise_recursive(layout.get_dragging_track_iter());
|
||||||
|
|
||||||
|
// Set the cursor to a hand
|
||||||
|
REQUIRE(gdkWindow);
|
||||||
|
gdkWindow->set_cursor(Gdk::Cursor(Gdk::HAND1));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TimelineHeaderContainer::end_drag()
|
||||||
|
{
|
||||||
|
TimelineLayoutHelper &layout = timelineWidget.layoutHelper;
|
||||||
|
|
||||||
|
// Has the user been dragging?
|
||||||
|
if(layout.get_dragging_track())
|
||||||
|
layout.end_dragging_track();
|
||||||
|
|
||||||
|
// Reset the arrow as a cursor
|
||||||
|
REQUIRE(gdkWindow);
|
||||||
|
gdkWindow->set_cursor(Gdk::Cursor(Gdk::ARROW));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,8 @@ private:
|
||||||
boost::shared_ptr<model::Track> model_track);
|
boost::shared_ptr<model::Track> model_track);
|
||||||
|
|
||||||
void begin_drag();
|
void begin_drag();
|
||||||
|
|
||||||
|
void end_drag();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recusively raises all the header widget windows in a branch to the
|
* Recusively raises all the header widget windows in a branch to the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue