From 4cd82846b7e5c660e0067846ee97a06424508c4c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 May 2016 03:17:53 +0200 Subject: fix script button sensitivity --- gtk2_ardour/ardour_ui_dependents.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/ardour_ui_dependents.cc') diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 3aad35ac06..68e29f57f8 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -309,7 +309,11 @@ ARDOUR_UI::setup_windows () assert (act); action_script_call_btn[i].set_text (string_compose ("%1", i+1)); action_script_call_btn[i].set_related_action (act); - action_script_call_btn[i].set_sensitive (act->get_sensitive ()); + if (act->get_sensitive ()) { + action_script_call_btn[i].set_visual_state (Gtkmm2ext::VisualState (action_script_call_btn[i].visual_state() & ~Gtkmm2ext::Insensitive)); + } else { + action_script_call_btn[i].set_visual_state (Gtkmm2ext::VisualState (action_script_call_btn[i].visual_state() | Gtkmm2ext::Insensitive)); + } const int row = i % 3; const int col = i / 3; action_script_table.attach (action_script_call_btn[i], col, col + 1, row, row + 1, EXPAND, EXPAND, 1, 1); -- cgit v1.2.3