mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 07:05:43 +01:00
Add 100% shuttle controls option - closes #6537
This commit is contained in:
parent
88920232e9
commit
ad4ae3df85
2 changed files with 13 additions and 0 deletions
|
|
@ -234,6 +234,8 @@ ShuttleControl::build_shuttle_context_menu ()
|
|||
|
||||
items.push_back (MenuElem (_("Maximum speed"), *speed_menu));
|
||||
|
||||
items.push_back (SeparatorElem ());
|
||||
items.push_back (MenuElem (_("Reset to 100%"), sigc::mem_fun (*this, &ShuttleControl::reset_speed)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -246,6 +248,16 @@ ShuttleControl::show_shuttle_context_menu ()
|
|||
shuttle_context_menu->popup (1, gtk_get_current_event_time());
|
||||
}
|
||||
|
||||
void
|
||||
ShuttleControl::reset_speed ()
|
||||
{
|
||||
if (_session->transport_rolling()) {
|
||||
_session->request_transport_speed (1.0, true);
|
||||
} else {
|
||||
_session->request_transport_speed (0.0, true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ShuttleControl::set_shuttle_max_speed (float speed)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ class ShuttleControl : public CairoWidget, public ARDOUR::SessionHandlePtr
|
|||
void shuttle_style_changed();
|
||||
void shuttle_unit_clicked ();
|
||||
void set_shuttle_max_speed (float);
|
||||
void reset_speed ();
|
||||
|
||||
bool on_enter_notify_event (GdkEventCrossing*);
|
||||
bool on_leave_notify_event (GdkEventCrossing*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue