X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fgain_meter.cc;h=420d356c903d737392990ba1520af293cefdadad;hb=71f471f162b3b2d832b3d6a7fcf8f9de1ecec3f4;hp=7e781cafd93cd1d6724f33f68dfd89264a229c2b;hpb=8c9749e42faf7808034ed8b7afce4a2fe6dc6f33;p=ardour.git diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 7e781cafd9..420d356c90 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "pbd/fastlog.h" #include "pbd/stacktrace.h" @@ -54,6 +53,7 @@ #include "i18n.h" using namespace ARDOUR; +using namespace ARDOUR_UI_UTILS; using namespace PBD; using namespace Gtkmm2ext; using namespace Gtk; @@ -98,13 +98,14 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int gain_display.signal_activate().connect (sigc::mem_fun (*this, &GainMeter::gain_activated)); gain_display.signal_focus_in_event().connect (sigc::mem_fun (*this, &GainMeter::gain_focused), false); gain_display.signal_focus_out_event().connect (sigc::mem_fun (*this, &GainMeter::gain_focused), false); - gain_display.set_alignment(1.0); + gain_display.set_alignment(0.5); peak_display.set_name ("MixerStripPeakDisplay"); set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */ max_peak = minus_infinity(); - peak_display.set_label (_("-inf")); + peak_display.set_text (_("-inf")); peak_display.unset_flags (Gtk::CAN_FOCUS); + peak_display.set_alignment(0.5); gain_automation_style_button.set_name ("mixer strip button"); gain_automation_state_button.set_name ("mixer strip button"); @@ -136,15 +137,6 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &GainMeterBase::on_theme_changed)); ColorsChanged.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), false)); DPIReset.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), true)); - -// PBD::ScopedConnection _config_connection; -// Config->ParameterChanged.connect ( _config_connection, MISSING_INVALIDATOR, boost::bind(&GainMeterBase::set_flat_buttons, this, _1), gui_context() ); -} - -void -GainMeterBase::set_flat_buttons () -{ -// gain_slider->set_flat_buttons( ARDOUR_UI::config()->flat_buttons.get() ); } GainMeterBase::~GainMeterBase () @@ -363,7 +355,7 @@ GainMeterBase::reset_peak_display () _meter->reset_max(); level_meter->clear_meters(); max_peak = -INFINITY; - peak_display.set_label (_("-inf")); + peak_display.set_text (_("-inf")); peak_display.set_name ("MixerStripPeakDisplay"); } @@ -862,10 +854,10 @@ GainMeterBase::update_meters() if (mpeak > max_peak) { max_peak = mpeak; if (mpeak <= -200.0f) { - peak_display.set_label (_("-inf")); + peak_display.set_text (_("-inf")); } else { snprintf (buf, sizeof(buf), "%.1f", mpeak); - peak_display.set_label (buf); + peak_display.set_text (buf); } } if (mpeak >= Config->get_meter_peak()) {