#include <gdkmm/color.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/fastmeter.h>
-#include <gtkmm2ext/barcontroller.h>
#include <gtkmm2ext/gtk_ui.h>
#include "pbd/fastlog.h"
#include "pbd/stacktrace.h"
#include "i18n.h"
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
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");
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 ()
_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");
}
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()) {