allow pianorolls not to show MIDI channel selector/dropdown

pianorolls have the visibility channel control. at some point we want the same idea
for the timeline, but it is not there yet
This commit is contained in:
Paul Davis 2025-06-23 16:16:12 -06:00
parent a17cf3929d
commit e448c3f4aa
4 changed files with 8 additions and 6 deletions

View file

@ -2133,15 +2133,17 @@ EditingContext::set_canvas_cursor (Gdk::Cursor* cursor)
}
void
EditingContext::pack_draw_box ()
EditingContext::pack_draw_box (bool with_channel)
{
/* Draw - these MIDI tools are only visible when in Draw mode */
draw_box.set_spacing (2);
draw_box.set_border_width (2);
draw_box.pack_start (*manage (new Label (_("Len:"))), false, false);
draw_box.pack_start (draw_length_selector, false, false, 4);
draw_box.pack_start (*manage (new Label (S_("MIDI|Ch:"))), false, false);
draw_box.pack_start (draw_channel_selector, false, false, 4);
if (with_channel) {
draw_box.pack_start (*manage (new Label (S_("MIDI|Ch:"))), false, false);
draw_box.pack_start (draw_channel_selector, false, false, 4);
}
draw_box.pack_start (*manage (new Label (_("Vel:"))), false, false);
draw_box.pack_start (draw_velocity_selector, false, false, 4);

View file

@ -715,7 +715,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
ArdourWidgets::ArdourVSpacer _grid_box_spacer;
ArdourWidgets::ArdourVSpacer _draw_box_spacer;
void pack_draw_box ();
void pack_draw_box (bool with_channel);
void pack_snap_box ();
Gtkmm2ext::BindingSet bindings;

View file

@ -2831,7 +2831,7 @@ Editor::setup_toolbar ()
grid_type_selector.set_name ("mouse mode button");
pack_draw_box ();
pack_draw_box (true);
HBox* follow_mode_hbox = manage (new HBox);
follow_mode_hbox->set_spacing (spc ? 2 : 1);

View file

@ -381,7 +381,7 @@ Pianoroll::build_upper_toolbar ()
mouse_mode_box->pack_start (*mouse_mode_align, false, false);
pack_snap_box ();
pack_draw_box ();
pack_draw_box (false);
Gtk::HBox* _toolbar_inner = manage (new Gtk::HBox);
Gtk::HBox* _toolbar_outer = manage (new Gtk::HBox);