13
0

change the peak display widget from Gtkmm2ext::FocusEntry to ArdourButton, since it is absolutely not editable.

This adds a new button name and corresponding colors in default_ui_config which requires a theme reset
This commit is contained in:
Paul Davis 2014-10-21 16:01:23 -04:00
parent 88d6cb2654
commit 58f7d02bf2
4 changed files with 13 additions and 7 deletions

View File

@ -235,6 +235,7 @@ BUTTON_VARS(MixerStripNameButton, "mixer strip name button")
BUTTON_VARS(MidiInputButton, "midi input button")
BUTTON_VARS(LockButton, "lock button")
BUTTON_VARS(GenericButton, "generic button")
BUTTON_VARS(PeakDisplayButton, "peak display")
#define CLOCK_VARS(root,name) \
CANVAS_VARIABLE(canvasvar_ ## root ## Background, name ": background") \

View File

@ -285,6 +285,12 @@
<Option name="monitor solo exclusive: led active" value="ffa500ff"/>
<Option name="monitor solo exclusive: text" value="c7c7d8ff"/>
<Option name="monitor solo exclusive: text active" value="c8c8d9ff"/>
<Option name="peak display: fill" value="000000ff"/>
<Option name="peak display: fill active" value="e21b1bff"/>
<Option name="peak display: led" value="00000000"/>
<Option name="peak display: led active" value="00000000"/>
<Option name="peak display: text" value="ffffffff"/>
<Option name="peak display: text active" value="000000ff"/>
<Option name="rude solo: fill" value="684d4dff"/>
<Option name="rude solo: fill active" value="e21b1bff"/>
<Option name="rude solo: led" value="00000000"/>

View File

@ -101,12 +101,11 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
gain_display.signal_focus_out_event().connect (sigc::mem_fun (*this, &GainMeter::gain_focused), false);
gain_display.set_alignment(0.5);
peak_display.set_name ("MixerStripPeakDisplay");
peak_display.set_name ("peak display");
set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */
max_peak = minus_infinity();
peak_display.set_text (_("-inf"));
peak_display.unset_flags (Gtk::CAN_FOCUS);
peak_display.set_alignment(0.5);
peak_display.set_alignment (0.5, 0.5);
gain_automation_style_button.set_name ("mixer strip button");
gain_automation_state_button.set_name ("mixer strip button");
@ -365,7 +364,7 @@ GainMeterBase::reset_peak_display ()
level_meter->clear_meters();
max_peak = -INFINITY;
peak_display.set_text (_("-inf"));
peak_display.set_name ("MixerStripPeakDisplay");
peak_display.set_active (false);
}
void
@ -860,8 +859,9 @@ GainMeterBase::update_meters()
peak_display.set_text (buf);
}
}
if (mpeak >= Config->get_meter_peak()) {
peak_display.set_name ("MixerStripPeakDisplayPeak");
peak_display.set_active (true);
}
}

View File

@ -111,8 +111,7 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
Gtkmm2ext::SliderController *gain_slider;
Gtk::Adjustment gain_adjustment;
Gtkmm2ext::FocusEntry gain_display;
Gtkmm2ext::FocusEntry peak_display;
// Gtk::Button peak_display;
ArdourButton peak_display;
Gtk::DrawingArea meter_metric_area;
Gtk::DrawingArea meter_ticks1_area;
Gtk::DrawingArea meter_ticks2_area;