13
0

L: Yet another layout-change for the ruler header area

This commit is contained in:
Ben Loftis 2024-05-23 10:12:34 -05:00
parent 03bd02f8e8
commit 39ea6b47b3

View File

@ -469,7 +469,7 @@ Editor::Editor ()
, track_drag (nullptr) , track_drag (nullptr)
#ifdef LIVETRAX #ifdef LIVETRAX
, _livetrax_btn_new_section (_("+Sec")) , _livetrax_btn_new_section (_("+Sec"))
, _livetrax_btn_new_location (_("+Loc")) , _livetrax_btn_new_location (_("+Mark"))
, _livetrax_btn_prev_marker (_("<<")) , _livetrax_btn_prev_marker (_("<<"))
, _livetrax_btn_next_marker (_(">>")) , _livetrax_btn_next_marker (_(">>"))
#endif #endif
@ -654,31 +654,38 @@ Editor::Editor ()
UI::instance()->set_tip (solo_btn, _("When active, something is soloed.\nClick to de-solo everything")); UI::instance()->set_tip (solo_btn, _("When active, something is soloed.\nClick to de-solo everything"));
solo_btn.set_related_action (ActionManager::get_action (X_("Main"), X_("cancel-solo"))); solo_btn.set_related_action (ActionManager::get_action (X_("Main"), X_("cancel-solo")));
Label *spcr = manage(new Label()); Label *mid_spcr = manage(new Label());
spcr->set_size_request(8,-1); mid_spcr->set_size_request(-1,-1);
HBox *marker_hbox = manage (new HBox()); Label *mid_spcr2 = manage(new Label());
marker_hbox->pack_start (_livetrax_btn_prev_marker, false, false, 2); mid_spcr2->set_size_request(-1,-1);
marker_hbox->pack_start (_livetrax_btn_next_marker, false, false, 2);
marker_hbox->pack_start (_livetrax_btn_new_section, false, false, 2);
marker_hbox->pack_start (_livetrax_btn_new_location, false, false, 2);
marker_hbox->pack_start (*manage(new Label()), false, false);
marker_hbox->pack_start (_zoom_box, false, false);
Table *tsizer = manage(new Table); Label *mtr_spcr = manage(new Label());
tsizer->set_homogeneous(false); mtr_spcr->set_size_request(4,-1);
tsizer->set_border_width(4);
tsizer->set_spacings(4);
tsizer->attach(_track_box, 0,2, 1,2, FILL, SHRINK);
tsizer->attach(*manage(new Label()), 2,4, 1,2, FILL|EXPAND, SHRINK);
tsizer->attach(_livetrax_btn_rec_all, 4,5, 1,2, SHRINK, SHRINK);
tsizer->attach(*spcr, 5,6, 1,2, SHRINK, SHRINK); //approx offset
VBox *tbar_packer = manage(new VBox()); int row = 0;
tbar_packer->pack_end(*tsizer, FILL|EXPAND, FILL|EXPAND); Table *marker_tbl = manage (new Table());
tbar_packer->pack_end(*marker_hbox, true, true); marker_tbl->set_spacings(4);
tbar_packer->pack_end(*manage (new Label()), true, true); marker_tbl->set_border_width(4);
time_bars_event_box.add (*tbar_packer);
marker_tbl->attach(_zoom_box, 0,1, row,row+1, FILL, SHRINK);
marker_tbl->attach(_livetrax_btn_prev_marker, 2,3, row,row+1, FILL, SHRINK);
marker_tbl->attach(_livetrax_btn_next_marker, 3,4, row,row+1, FILL, SHRINK);
marker_tbl->attach(_livetrax_btn_new_location, 5,8, row,row+1, FILL, SHRINK); row++;
marker_tbl->attach(_livetrax_btn_new_section, 5,8, row,row+1, FILL, SHRINK); row++;
marker_tbl->attach(*mid_spcr, 1,2, row,row+1, FILL|EXPAND, FILL|EXPAND);
marker_tbl->attach(*mid_spcr2, 4,5, row,row+1, FILL|EXPAND, FILL|EXPAND); row++;//resizy-bits to fill the gaps
marker_tbl->attach(_track_box, 0,1, row,row+1, FILL, SHRINK);
marker_tbl->attach(*manage(new Label()), 5,6, row,row+1, FILL|EXPAND, SHRINK);
marker_tbl->attach(_livetrax_btn_rec_all, 6,7, row,row+1, SHRINK, SHRINK);
marker_tbl->attach(*mtr_spcr, 7,8, row,row+1, SHRINK, SHRINK);
marker_tbl->show_all();
time_bars_event_box.add (*marker_tbl);
#else #else
time_bars_event_box.add (time_bars_vbox); time_bars_event_box.add (time_bars_vbox);
#endif #endif
@ -988,27 +995,27 @@ Editor::livetrax_assign_ui_dependent_actions()
{ {
Glib::RefPtr<Action> act; Glib::RefPtr<Action> act;
_livetrax_btn_prev_marker.set_tooltip_text(_("Jump to Prior Marker"));
_livetrax_btn_prev_marker.set_elements(ArdourButton::Element (ArdourButton::VectorIcon|ArdourButton::Body)); _livetrax_btn_prev_marker.set_elements(ArdourButton::Element (ArdourButton::VectorIcon|ArdourButton::Body));
_livetrax_btn_prev_marker.set_icon(ArdourWidgets::ArdourIcon::ScrollLeft); _livetrax_btn_prev_marker.set_icon(ArdourWidgets::ArdourIcon::ScrollLeft);
act = ActionManager::get_action (X_("Common"), X_("jump-backward-to-mark")); act = ActionManager::get_action (X_("Common"), X_("jump-backward-to-mark"));
_livetrax_btn_prev_marker.set_related_action (act); _livetrax_btn_prev_marker.set_related_action (act);
set_tooltip (_livetrax_btn_prev_marker, _("Jump to Prior Marker"));
_livetrax_btn_next_marker.set_tooltip_text(_("Jump to Next Marker"));
_livetrax_btn_next_marker.set_elements(ArdourButton::Element (ArdourButton::VectorIcon|ArdourButton::Body)); _livetrax_btn_next_marker.set_elements(ArdourButton::Element (ArdourButton::VectorIcon|ArdourButton::Body));
_livetrax_btn_next_marker.set_icon(ArdourWidgets::ArdourIcon::ScrollRight); _livetrax_btn_next_marker.set_icon(ArdourWidgets::ArdourIcon::ScrollRight);
act = ActionManager::get_action (X_("Common"), X_("jump-forward-to-mark")); act = ActionManager::get_action (X_("Common"), X_("jump-forward-to-mark"));
_livetrax_btn_next_marker.set_related_action (act); _livetrax_btn_next_marker.set_related_action (act);
set_tooltip (_livetrax_btn_next_marker, _("Jump to Next Marker"));
_livetrax_btn_new_location.set_tooltip_text(_("Create a New Location at Playhead"));
_livetrax_btn_new_location.set_elements(ArdourButton::Element (ArdourButton::Text|ArdourButton::Body)); _livetrax_btn_new_location.set_elements(ArdourButton::Element (ArdourButton::Text|ArdourButton::Body));
act = ActionManager::get_action (X_("Common"), X_("add-location-from-playhead")); act = ActionManager::get_action (X_("Common"), X_("add-location-from-playhead"));
_livetrax_btn_new_location.set_related_action (act); _livetrax_btn_new_location.set_related_action (act);
set_tooltip (_livetrax_btn_new_location, _("Create a New Marker at Playhead"));
_livetrax_btn_new_section.set_tooltip_text(_("Start a New Section at Playhead"));
_livetrax_btn_new_section.set_elements(ArdourButton::Element (ArdourButton::Text|ArdourButton::Body)); _livetrax_btn_new_section.set_elements(ArdourButton::Element (ArdourButton::Text|ArdourButton::Body));
act = ActionManager::get_action (X_("Common"), X_("add-section-from-playhead")); act = ActionManager::get_action (X_("Common"), X_("add-section-from-playhead"));
_livetrax_btn_new_section.set_related_action (act); _livetrax_btn_new_section.set_related_action (act);
set_tooltip (_livetrax_btn_new_section, _("Start a New Section at Playhead"));
} }
#endif #endif
@ -3500,17 +3507,29 @@ Editor::setup_toolbar ()
zoom_preset_selector.set_icon (ArdourIcon::ZoomExpand); zoom_preset_selector.set_icon (ArdourIcon::ZoomExpand);
zoom_in_button.set_name ("zoom button"); zoom_in_button.set_name ("zoom button");
#ifndef LIVETRAX
zoom_in_button.set_icon (ArdourIcon::ZoomIn); zoom_in_button.set_icon (ArdourIcon::ZoomIn);
#else
zoom_in_button.set_text ("+");
#endif
act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-in")); act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-in"));
zoom_in_button.set_related_action (act); zoom_in_button.set_related_action (act);
zoom_out_button.set_name ("zoom button"); zoom_out_button.set_name ("zoom button");
#ifndef LIVETRAX
zoom_out_button.set_icon (ArdourIcon::ZoomOut); zoom_out_button.set_icon (ArdourIcon::ZoomOut);
#else
zoom_out_button.set_text ("-");
#endif
act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-out")); act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-out"));
zoom_out_button.set_related_action (act); zoom_out_button.set_related_action (act);
zoom_out_full_button.set_name ("zoom button"); zoom_out_full_button.set_name ("zoom button");
#ifndef LIVETRAX
zoom_out_full_button.set_icon (ArdourIcon::ZoomFull); zoom_out_full_button.set_icon (ArdourIcon::ZoomFull);
#else
zoom_out_full_button.set_text ("z");
#endif
act = ActionManager::get_action (X_("Editor"), X_("zoom-to-session")); act = ActionManager::get_action (X_("Editor"), X_("zoom-to-session"));
zoom_out_full_button.set_related_action (act); zoom_out_full_button.set_related_action (act);