mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
use FocusEntry for the peak_display, so it matches the size of gain_display
This commit is contained in:
parent
f91846d5f8
commit
394ea9cb86
2 changed files with 6 additions and 5 deletions
|
|
@ -104,7 +104,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
|
|||
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);
|
||||
|
||||
gain_automation_style_button.set_name ("mixer strip button");
|
||||
|
|
@ -364,7 +364,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");
|
||||
}
|
||||
|
||||
|
|
@ -863,10 +863,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()) {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
|
|||
Gtkmm2ext::SliderController *gain_slider;
|
||||
Gtk::Adjustment gain_adjustment;
|
||||
Gtkmm2ext::FocusEntry gain_display;
|
||||
Gtk::Button peak_display;
|
||||
Gtkmm2ext::FocusEntry peak_display;
|
||||
// Gtk::Button peak_display;
|
||||
Gtk::DrawingArea meter_metric_area;
|
||||
Gtk::DrawingArea meter_ticks1_area;
|
||||
Gtk::DrawingArea meter_ticks2_area;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue