From 55596e2bf0ab92ac229cdcdc984785c6c7592270 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 4 Oct 2018 21:55:44 +0200 Subject: Change color of nudge-buttons depending on selection. Experimental. This indicates region selection: * nudge region(s): red * nudge playhead or marker(s): default gray This does not indicate marker selection (nudge marker vs playhead), nor does it change when primary-modifier is held (force playhead nudge). --- gtk2_ardour/editor_selection.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 61699afe09..227eaa4a63 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1571,8 +1571,20 @@ Editor::region_selection_changed () } } - if ( _session->solo_selection_active() ) + if (_session->solo_selection_active()) { play_solo_selection(false); + } + + /* set nudge button color */ + if (! get_regions_from_selection_and_entered().empty()) { + /* nudge regions */ + nudge_forward_button.set_name ("nudge button"); + nudge_backward_button.set_name ("nudge button"); + } else { + /* nudge marker or playhead */ + nudge_forward_button.set_name ("generic button"); + nudge_backward_button.set_name ("generic button"); + } } void -- cgit v1.2.3