improve visibility management of clip property/editing displays

This commit is contained in:
Paul Davis 2025-02-09 10:41:21 -07:00
parent 37806ef15c
commit 93225114d4
3 changed files with 50 additions and 33 deletions

View file

@ -361,6 +361,10 @@ SlotPropertyTable::SlotPropertyTable ()
eLaunchBox->set_edge_color (0x000000ff); // black
eLaunchBox->add (_launch_table);
trigBox->show_all();
eLaunchBox->show_all();
eFollowBox->show_all();
attach(*trigBox, 0,1, 0,1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
attach(*eLaunchBox, 0,1, 1,2, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
attach(*eFollowBox, 0,1, 2,3, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);

View file

@ -73,6 +73,7 @@ TriggerPage::TriggerPage ()
, _master (_master_widget.root ())
, _show_bottom_pane (false)
, _selection (*this, *this)
, clip_editor_column (-1)
{
load_bindings ();
register_actions ();
@ -143,22 +144,20 @@ TriggerPage::TriggerPage ()
_midi_editor = new Pianoroll (X_("MIDICueEditor"));
/* Bottom -- Properties of selected Slot/Region */
Gtk::Table* table = manage (new Gtk::Table);
table->set_homogeneous (false);
table->set_spacings (8); //match to slot_properties_box::set_spacings
table->set_border_width (8);
table.set_homogeneous (false);
table.set_spacings (8); //match to slot_properties_box::set_spacings
table.set_border_width (8);
int col = 0;
table->attach (_slot_prop_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
++col;
table->attach (_audio_trig_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
++col;
table->attach (_midi_editor->contents(), col, col + 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL);
table.attach (_slot_prop_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
++col;
table.attach (_audio_trig_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
clip_editor_column = ++col;
table->show_all ();
table.set_no_show_all ();
_parameter_box.pack_start (*table);
_parameter_box.pack_start (table);
_parameter_box.show ();
_sidebar_notebook.signal_switch_page().connect ([this](GtkNotebookPage*, guint page) {
@ -516,36 +515,48 @@ TriggerPage::selection_changed ()
_slot_prop_box.hide ();
_audio_trig_box.hide ();
_midi_trig_box.hide ();
_midi_editor->viewport().hide ();
if (_midi_editor->contents().get_parent()) {
_midi_editor->contents().get_parent()->remove (_midi_editor->contents());
}
Tabbable::showhide_att_bottom (false);
if (!selection.triggers.empty ()) {
TriggerSelection ts = selection.triggers;
TriggerEntry* entry = *ts.begin ();
TriggerReference ref = entry->trigger_reference ();
TriggerPtr trigger = entry->trigger ();
std::shared_ptr<TriggerBox> box = ref.box();
if (selection.triggers.empty ()) {
return;
}
_slot_prop_box.set_slot (ref);
_slot_prop_box.show ();
TriggerSelection ts = selection.triggers;
TriggerEntry* entry = *ts.begin ();
TriggerReference ref = entry->trigger_reference ();
TriggerPtr trigger = entry->trigger ();
std::shared_ptr<TriggerBox> box = ref.box();
if (box->data_type () == DataType::AUDIO) {
if (trigger->the_region()) {
_audio_trig_box.set_trigger (ref);
_audio_trig_box.show ();
}
} else {
_midi_trig_box.set_trigger (ref);
_midi_trig_box.show ();
_slot_prop_box.set_slot (ref);
_slot_prop_box.show ();
_midi_editor->set (ref);
_midi_editor->viewport().show ();
if (box->data_type () == DataType::AUDIO) {
if (trigger->the_region()) {
_audio_trig_box.set_trigger (ref);
_audio_trig_box.show ();
}
if (_show_bottom_pane) {
Tabbable::showhide_att_bottom (true);
}
} else {
_midi_trig_box.set_trigger (ref);
_midi_trig_box.show ();
_midi_editor->set (ref);
table.attach (_midi_editor->contents(), clip_editor_column, clip_editor_column + 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL);
_midi_editor->contents().show_all ();
}
table.show ();
if (_show_bottom_pane) {
Tabbable::showhide_att_bottom (true);
}
}

View file

@ -126,6 +126,7 @@ private:
TriggerSourceList _trigger_source_list;
TriggerRegionList _trigger_region_list;
TriggerRouteList _trigger_route_list;
Gtk::Table table;
CueBoxWidget _cue_box;
FittedCanvasWidget _master_widget;
@ -148,5 +149,6 @@ private:
RouteProcessorSelection _selection;
std::list<TriggerStrip*> _strips;
sigc::connection _fast_screen_update_connection;
int clip_editor_column;
};