13
0

L: remove box around meters; replace with drop-shadow separators

This commit is contained in:
Ben Loftis 2024-05-09 09:56:06 -05:00
parent e18c194a49
commit 577640588e
4 changed files with 23 additions and 2 deletions

View File

@ -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"))

View File

@ -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;

View File

@ -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);
}
}

View File

@ -1,6 +1,8 @@
#include "ardour/logmeter.h"
#include "ardour/audioengine.h"
#include <gtkmm/viewport.h>
#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<Gtk::Viewport*> (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 ());