13
0
Fork 0

LT: omnibus layout changes (top toolbar, preferences, arranger+sidebar)

This commit is contained in:
Ben Loftis 2024-05-02 12:10:46 -05:00
parent 96eab77aaf
commit f8026fd4bb
4 changed files with 140 additions and 56 deletions

View File

@ -342,6 +342,12 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
, dsp_statistics_window (X_("dsp-statistics"), _("Performance Meters"))
, transport_masters_window (X_("transport-masters"), _("Transport Masters"))
, livetrax_track_dialog (nullptr)
, _livetrax_btn_rec_all (_("Rec All"))
, _livetrax_btn_rec_none (_("Rec None"))
, _livetrax_btn_peak_reset (_("Reset Peak Hold"))
, _livetrax_btn_marker_new (_("New"))
, _livetrax_btn_prev_marker (_("Prev"))
, _livetrax_btn_next_marker (_("Next"))
, session_option_editor (X_("session-options-editor"), _("Properties"), boost::bind (&ARDOUR_UI::create_session_option_editor, this))
, add_video_dialog (X_("add-video"), _("Add Video"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this))
, bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this))

View File

@ -643,16 +643,27 @@ private:
/* LiveTrax */
Gtk::HBox livetrax_top_bar;
Gtk::HBox livetrax_transport_bar;
Gtk::Table livetrax_top_table;
Gtk::Table livetrax_edit_table;
Gtk::HBox livetrax_meter_bar;
Gtk::HBox livetrax_editor_bar;
Gtk::HBox livetrax_prefs_bar;
Gtk::HBox livetrax_mixer_bar;
ArdourWidgets::ArdourButton _livetrax_btn_rec_all;
ArdourWidgets::ArdourButton _livetrax_btn_rec_none;
ArdourWidgets::ArdourButton _livetrax_btn_peak_reset;
ArdourWidgets::ArdourButton _livetrax_btn_marker_new;
ArdourWidgets::ArdourButton _livetrax_btn_prev_marker;
ArdourWidgets::ArdourButton _livetrax_btn_next_marker;
TimeInfoBox* livetrax_time_info_box;
ArdourWidgets::ArdourButton* livetrax_multi_out_button;
ArdourWidgets::ArdourButton* livetrax_stereo_out_button;
ArdourWidgets::ArdourButton* livetrax_meter_view_button;
ArdourWidgets::ArdourButton* livetrax_editor_view_button;
ArdourWidgets::ArdourButton* livetrax_prefs_view_button;
ArdourWidgets::ArdourButton* livetrax_mixer_view_button;
ArdourWidgets::ArdourButton* livetrax_lock_button;
ArdourWidgets::ArdourButton* livetrax_view_in_folder_button;

View File

@ -392,8 +392,9 @@ ARDOUR_UI::livetrax_setup_windows ()
using namespace Gtk;
rc_option_editor = new RCOptionEditor;
rc_option_editor->hide();
ArdourButton::set_default_tweaks (ArdourButton::Tweaks (ArdourButton::ForceBoxy|ArdourButton::ForceFlat));
ArdourButton::set_default_tweaks (ArdourButton::Tweaks (ArdourButton::ForceFlat));
if (create_editor()) {
error << _("UI: cannot setup editor") << endmsg;
@ -405,8 +406,11 @@ ARDOUR_UI::livetrax_setup_windows ()
return -1;
}
livetrax_time_info_box = new TimeInfoBox ("LiveTraxTimeInfo", false);
Image* icon = manage (new Image (ARDOUR_UI_UTILS::get_icon ("allenheath")));
_livetrax_sections = new EditorSections();
Image* icon = manage (new Image (ARDOUR_UI_UTILS::get_icon ("harrison")));
VBox* icon_vb = manage(new VBox());
icon_vb->pack_start(*icon);
VBox* vb;
HBox* hb;
@ -414,11 +418,7 @@ ARDOUR_UI::livetrax_setup_windows ()
Gtkmm2ext::Bindings* bindings;
Glib::RefPtr<Action> act;
livetrax_top_bar.set_spacing (12);
livetrax_top_bar.set_border_width (12);
livetrax_top_bar.pack_start (*icon, false, false);
livetrax_top_bar.pack_start (*livetrax_time_info_box, false, false);
livetrax_top_bar.pack_start (*primary_clock, false, false);
livetrax_top_table.set_border_width (4);
EventBox* ev_dsp = manage (new EventBox);
EventBox* ev_timecode = manage (new EventBox);
@ -433,21 +433,9 @@ ARDOUR_UI::livetrax_setup_windows ()
items.push_back (MenuElem (_("24 bit FLAC"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::livetrax_set_file_format), LiveTraxFileFormat (ARDOUR::FormatInt24, ARDOUR::FLAC))));
livetrax_sr_button = manage (new ArdourButton (""));
vb = manage (new VBox);
vb->pack_start (*livetrax_ff_dropdown, false, false);
vb->pack_start (*livetrax_sr_button, false, false);
livetrax_top_bar.pack_start (*vb, false, false);
CairoWidget* cw = new LiveTraxTCWidget;
cw->show ();
livetrax_top_bar.pack_start (*cw, false, false);
vb = manage (new VBox);
vb->pack_start (*ev_dsp, true, true);
vb->pack_start (disk_space_label, true, true);
vb->show_all ();
livetrax_top_bar.pack_end (*vb, false, false);
livetrax_multi_out_button = manage (new ArdourButton (_("Multi Out")));
livetrax_stereo_out_button = manage (new ArdourButton (_("Stereo Out")));
@ -456,14 +444,16 @@ ARDOUR_UI::livetrax_setup_windows ()
act = ActionManager::get_action (X_("Common"), X_("enable-virtual-soundcheck"));
livetrax_multi_out_button->set_related_action (act);
vb = manage (new VBox);
vb->pack_start (*livetrax_stereo_out_button, true, true);
vb->pack_start (*livetrax_multi_out_button, true, true);
vb->show_all ();
livetrax_view_in_folder_button = manage (new ArdourButton (elements));
livetrax_view_in_folder_button->set_icon (ArdourWidgets::ArdourIcon::Folder);
livetrax_top_bar.pack_end (*vb, false, false);
livetrax_editor_view_button = manage (new ArdourButton (_("TRACKS"), ArdourButton::Element (ArdourButton::Text|ArdourButton::Edge|ArdourButton::Body), true));
act = ActionManager::get_action (X_("Common"), X_("livetrax-toggle-editor"));
livetrax_editor_view_button->set_related_action (act);
/* transport bar */
livetrax_prefs_view_button = manage (new ArdourButton (_("PREFS"), ArdourButton::Element (ArdourButton::Text|ArdourButton::Edge|ArdourButton::Body), true));
act = ActionManager::get_action (X_("Common"), X_("livetrax-toggle-prefs"));
livetrax_prefs_view_button->set_related_action (act);
livetrax_meter_view_button = manage (new ArdourButton (ArdourButton::Element (ArdourButton::Text|ArdourButton::Edge|ArdourButton::Body), true));;
livetrax_meter_view_button->set_icon (ArdourWidgets::ArdourIcon::Meters);
@ -475,53 +465,104 @@ ARDOUR_UI::livetrax_setup_windows ()
act = ActionManager::get_action (X_("Common"), X_("livetrax-toggle-mixer"));
livetrax_mixer_view_button->set_related_action (act);
livetrax_editor_view_button = manage (new ArdourButton (_("TRACKS"), ArdourButton::Element (ArdourButton::Text|ArdourButton::Edge|ArdourButton::Body), true));
act = ActionManager::get_action (X_("Common"), X_("livetrax-toggle-editor"));
livetrax_editor_view_button->set_related_action (act);
HBox *view_box = manage (new HBox);
view_box->set_spacing(4);
view_box->pack_start (*livetrax_meter_view_button, false, false);
view_box->pack_start (*livetrax_editor_view_button, false, false);
view_box->pack_start (*livetrax_mixer_view_button, false, false);
livetrax_transport_bar.pack_start (*livetrax_editor_view_button, false, false);
livetrax_transport_bar.pack_start (*livetrax_mixer_view_button, false, false);
livetrax_transport_bar.pack_start (*livetrax_meter_view_button, false, false);
hb = manage (new HBox);
hb->pack_start (transport_ctrl, false, false);
livetrax_lock_button = manage (new ArdourButton (ArdourButton::default_elements, true));
livetrax_lock_button = manage (new ArdourButton (elements, true));
livetrax_lock_button->set_icon (ArdourWidgets::ArdourIcon::Lock);
act = ActionManager::get_action (X_("Editor"), X_("lock"));
livetrax_lock_button->set_related_action (act);
editor->mouse_mode_hbox->pack_start (*livetrax_lock_button, false, false, 12);
livetrax_transport_bar.pack_start (*hb, true, false);
livetrax_transport_bar.pack_start (*editor->mouse_mode_hbox, true, false);
int TCOL = 0;
livetrax_view_in_folder_button = manage (new ArdourButton (_("MEDIA"), elements));
editor->_zoom_box.pack_start (*livetrax_view_in_folder_button, false, false, 12);
livetrax_top_table.attach (*livetrax_lock_button, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (*livetrax_view_in_folder_button, TCOL+1, TCOL+2, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (*livetrax_prefs_view_button, TCOL+2, TCOL+3, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (*view_box, TCOL, TCOL+3, 1, 2, FILL, FILL, 4, 4); TCOL+=3;
livetrax_transport_bar.pack_end (editor->_zoom_box, false, false);
livetrax_transport_bar.pack_end (editor->_track_box, false, false);
livetrax_transport_bar.show_all ();
livetrax_top_table.attach (*manage(new Label("")), TCOL, TCOL+1, 0, 2, EXPAND, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (transport_ctrl, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (_livetrax_btn_prev_marker, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (_livetrax_btn_marker_new, TCOL+1, TCOL+2, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (_livetrax_btn_next_marker, TCOL+2, TCOL+3, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (*primary_clock, TCOL, TCOL+3, 1, 2, FILL, FILL, 4, 4); TCOL+=3;
// livetrax_top_table.attach (*manage(new Label("")), TCOL, TCOL+1, 0, 2, EXPAND, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (*icon_vb, TCOL, TCOL+1, 0, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (_livetrax_btn_rec_all, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (_livetrax_btn_rec_none, TCOL+1, TCOL+2, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (_livetrax_btn_peak_reset, TCOL+2, TCOL+3, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (editor->_track_box, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (*editor->mouse_mode_hbox, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (editor->_zoom_box, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (*manage(new Label("")), TCOL, TCOL+1, 0, 2, EXPAND, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (sync_button, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (*livetrax_ff_dropdown, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (*livetrax_sr_button, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
// livetrax_top_table.attach (*cw, TCOL, TCOL+1, 0, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (*livetrax_stereo_out_button, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (*livetrax_multi_out_button, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table.attach (*ev_dsp, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table.attach (disk_space_label, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
/* editor bar */
TCOL = 0;
livetrax_time_info_box = new TimeInfoBox ("LiveTraxTimeInfo", false);
// livetrax_edit_table.attach (*livetrax_time_info_box, TCOL, TCOL+1, 0, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_edit_table.show_all ();
/* meter display */
livetrax_meters = manage (new LiveTraxMeters (48));
livetrax_meters->show_all ();
livetrax_meter_bar.set_border_width (12);
livetrax_meter_bar.pack_start (*livetrax_meters, true, true, 12);
// livetrax_meter_bar.set_border_width (4);
livetrax_meter_bar.pack_start (*livetrax_meters, true, true, 0);
hb = manage (new HBox);
hb->pack_start (rc_option_editor->contents(), true, true);
livetrax_prefs_bar.pack_start (*hb, true, true);
hb = manage (new HBox);
livetrax_edit_vscrollbar = manage (new VScrollbar (editor->vertical_adjustment));
livetrax_edit_vscrollbar->show ();
hb->pack_start (editor->contents(), true, true);
hb->pack_start (*livetrax_edit_vscrollbar, false, false);
// hb->pack_start (livetrax_edit_table, false, false);
livetrax_section_pane.set_child_minsize(_livetrax_sections->widget(), 30);
livetrax_section_pane.set_divider(0, 0.99);
livetrax_section_pane.add(*hb);
livetrax_section_pane.add (_livetrax_sections->widget());
vb = manage (new VBox);
livetrax_edit_hscrollbar = manage (new HScrollbar (editor->horizontal_adjustment));
livetrax_edit_hscrollbar->show ();
vb->pack_start (*hb, true, true);
vb->pack_start (livetrax_section_pane, true, true);
vb->pack_start (*livetrax_edit_hscrollbar, false, false);
livetrax_editor_bar.pack_start (*vb, true, true);
livetrax_section_pane.set_divider(0, 0.99);
livetrax_mixer_bar.pack_start (mixer->contents(), true, true);
we_have_dependents ();
@ -529,10 +570,10 @@ ARDOUR_UI::livetrax_setup_windows ()
/* order of addition affects order seen in initial window display */
main_vpacker.pack_start (menu_bar_base, false, false);
main_vpacker.pack_start (livetrax_top_bar, false, false);
main_vpacker.pack_start (livetrax_transport_bar, false, false);
main_vpacker.pack_start (livetrax_top_table, false, false);
main_vpacker.pack_start (livetrax_meter_bar, false, false);
main_vpacker.pack_start (livetrax_editor_bar, true, true);
main_vpacker.pack_start (livetrax_prefs_bar, true, false);
main_vpacker.pack_start (livetrax_mixer_bar, true, true);
connect_transport_elements ();
@ -544,9 +585,6 @@ ARDOUR_UI::livetrax_setup_windows ()
bindings = Bindings::get_bindings (X_("Mixer"));
livetrax_mixer_bar.set_data ("ardour-bindings", bindings);
_livetrax_visibility = LiveTraxVisibility (LiveTraxMeterVisible|LiveTraxMixerVisible|LiveTraxEditorVisible);
livetrax_visibility_change ();
// setup_tooltips ();
_main_window.signal_delete_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::main_window_delete_event));
@ -561,6 +599,9 @@ ARDOUR_UI::livetrax_setup_windows ()
setup_toplevel_window (_main_window, "", this);
_main_window.show_all ();
_livetrax_visibility = LiveTraxVisibility (LiveTraxMeterVisible|LiveTraxMixerVisible|LiveTraxEditorVisible);
livetrax_visibility_change ();
#ifdef GDK_WINDOWING_X11
/* allow externalUIs to be transient, on top of the main window */
LV2Plugin::set_main_window_id (GDK_DRAWABLE_XID(_main_window.get_window()->gobj()));
@ -721,13 +762,23 @@ ARDOUR_UI::livetrax_visibility_change ()
}
if (_livetrax_visibility & LiveTraxEditorVisible) {
livetrax_edit_table.show ();
livetrax_editor_bar.show ();
livetrax_editor_view_button->set_active_state (Gtkmm2ext::ExplicitActive);
} else {
livetrax_edit_table.hide ();
livetrax_editor_bar.hide ();
livetrax_editor_view_button->set_active_state (Gtkmm2ext::Off);
}
if (_livetrax_visibility & LiveTraxPrefsVisible) {
livetrax_prefs_bar.show ();
livetrax_prefs_view_button->set_active_state (Gtkmm2ext::ExplicitActive);
} else {
livetrax_prefs_bar.hide ();
livetrax_prefs_view_button->set_active_state (Gtkmm2ext::Off);
}
if (_livetrax_visibility & LiveTraxMixerVisible) {
livetrax_mixer_bar.show ();
livetrax_mixer_view_button->set_active_state (Gtkmm2ext::ExplicitActive);
@ -743,7 +794,19 @@ ARDOUR_UI::livetrax_toggle_visibility (LiveTraxVisibility v)
if (_livetrax_visibility & v) {
_livetrax_visibility = LiveTraxVisibility (_livetrax_visibility & ~v);
} else {
_livetrax_visibility = LiveTraxVisibility (_livetrax_visibility | v);
_livetrax_visibility = LiveTraxVisibility (_livetrax_visibility | v);
}
if (_livetrax_visibility==0) { //at minimum always show tracks
_livetrax_visibility = LiveTraxVisibility (LiveTraxEditorVisible);
}
//enforce exclusivity between tracks and prefs
if (v==LiveTraxEditorVisible) {
_livetrax_visibility = LiveTraxVisibility (_livetrax_visibility & ~LiveTraxPrefsVisible);
}
if (v==LiveTraxPrefsVisible) {
_livetrax_visibility = LiveTraxVisibility (LiveTraxPrefsVisible); //ONLY show prefs
}
livetrax_visibility_change ();

View File

@ -3452,7 +3452,9 @@ Editor::setup_toolbar ()
_zoom_box.pack_start (zoom_out_button, false, false);
_zoom_box.pack_start (zoom_in_button, false, false);
_zoom_box.pack_start (zoom_out_full_button, false, false);
#ifndef LIVETRAX
_zoom_box.pack_start (zoom_focus_selector, false, false);
#endif
}
/* Track zoom buttons */
@ -3478,6 +3480,8 @@ Editor::setup_toolbar ()
if (ARDOUR::Profile->get_mixbus()) {
_track_box.pack_start (visible_tracks_selector);
} else if (ARDOUR::Profile->get_livetrax()) {
_track_box.pack_start (visible_tracks_selector);
} else {
_track_box.pack_start (visible_tracks_selector);
_track_box.pack_start (tav_shrink_button);