From 577640588e2985c75cc47d667a3306b1a8ae7a27 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 9 May 2024 09:56:06 -0500 Subject: [PATCH] L: remove box around meters; replace with drop-shadow separators --- gtk2_ardour/ardour_ui.cc | 3 +++ gtk2_ardour/ardour_ui.h | 4 ++++ gtk2_ardour/ardour_ui_dependents.cc | 13 +++++++++++-- gtk2_ardour/livetrax_meters.cc | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 89069ea4ae..64f541f9c1 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -321,6 +321,9 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) , editor_meter(0) , _clear_editor_meter( true) , _editor_meter_peaked (false) + , _livetrax_spacer1 (ArdourWidgets::ArdourDropShadow::DropShadowLongSideOnly, 1.0) + , _livetrax_spacer2 (ArdourWidgets::ArdourDropShadow::DropShadowLongSideOnly, 1.0) + , _livetrax_spacer3 (ArdourWidgets::ArdourDropShadow::DropShadowLongSideOnly, 1.0) , _livetrax_btn_peak_reset (_("Reset Peaks")) , _livetrax_btn_new_section (_("+Sec")) , _livetrax_btn_new_location (_("+Loc")) diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 670f986f90..f46cb0519c 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -657,6 +657,10 @@ private: Gtk::HBox livetrax_prefs_bar; Gtk::HBox livetrax_mixer_bar; + ArdourWidgets::ArdourDropShadow _livetrax_spacer1; + ArdourWidgets::ArdourDropShadow _livetrax_spacer2; + ArdourWidgets::ArdourDropShadow _livetrax_spacer3; + ArdourWidgets::ArdourButton _livetrax_btn_peak_reset; ArdourWidgets::ArdourButton _livetrax_btn_new_section; diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index f66a9587fb..109315ff4b 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -585,8 +585,6 @@ ARDOUR_UI::livetrax_setup_windows () livetrax_edit_hscrollbar = manage (new HScrollbar (editor->horizontal_adjustment)); livetrax_edit_hscrollbar->show (); 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); @@ -613,13 +611,20 @@ ARDOUR_UI::livetrax_setup_windows () act = ActionManager::get_action (X_("Common"), X_("add-section-from-playhead")); _livetrax_btn_new_section.set_related_action (act); + _livetrax_spacer1.set_size_request(-1, 6); + _livetrax_spacer2.set_size_request(-1, 12); + _livetrax_spacer3.set_size_request(-1, 12); + /* order of addition affects order seen in initial window display */ main_vpacker.pack_start (menu_bar_base, false, false); + main_vpacker.pack_start (_livetrax_spacer1, false, false); main_vpacker.pack_start (*livetrax_top_bar, false, false); main_vpacker.pack_start (livetrax_meter_bar, false, false); + main_vpacker.pack_start (_livetrax_spacer2, 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_spacer3, false, false); main_vpacker.pack_start (livetrax_mixer_bar, false, false); connect_transport_elements (); @@ -810,10 +815,12 @@ ARDOUR_UI::livetrax_visibility_change () if (_livetrax_visibility & LiveTraxEditorVisible) { livetrax_edit_table.show (); livetrax_editor_bar.show (); + _livetrax_spacer2.show(); livetrax_editor_view_button->set_active_state (Gtkmm2ext::ExplicitActive); } else { livetrax_edit_table.hide (); livetrax_editor_bar.hide (); + _livetrax_spacer2.hide(); livetrax_editor_view_button->set_active_state (Gtkmm2ext::Off); } @@ -827,9 +834,11 @@ ARDOUR_UI::livetrax_visibility_change () if (_livetrax_visibility & LiveTraxMixerVisible) { livetrax_mixer_bar.show (); + _livetrax_spacer3.show(); livetrax_mixer_view_button->set_active_state (Gtkmm2ext::ExplicitActive); } else { livetrax_mixer_bar.hide (); + _livetrax_spacer3.hide(); livetrax_mixer_view_button->set_active_state (Gtkmm2ext::Off); } } diff --git a/gtk2_ardour/livetrax_meters.cc b/gtk2_ardour/livetrax_meters.cc index ff2acd38b3..70f7bc41cb 100644 --- a/gtk2_ardour/livetrax_meters.cc +++ b/gtk2_ardour/livetrax_meters.cc @@ -1,6 +1,8 @@ #include "ardour/logmeter.h" #include "ardour/audioengine.h" +#include + #include "widgets/fastmeter.h" #include "gui_thread.h" @@ -20,6 +22,9 @@ LiveTraxMeters::LiveTraxMeters () _meter_box.set_spacing (PX_SCALE (10)); add (_meter_box); + Gtk::Viewport *vp = dynamic_cast (get_child()); + vp->set_shadow_type(Gtk::SHADOW_NONE); + AudioEngine::instance ()->Running.connect (_engine_connections, invalidator (*this), boost::bind (&LiveTraxMeters::start_updating, this), gui_context ()); AudioEngine::instance ()->Stopped.connect (_engine_connections, invalidator (*this), boost::bind (&LiveTraxMeters::stop_updating, this), gui_context ()); AudioEngine::instance ()->Halted.connect (_engine_connections, invalidator (*this), boost::bind (&LiveTraxMeters::stop_updating, this), gui_context ());