slimming diet for the narrow-mixer strip

This commit is contained in:
Robin Gareus 2013-07-10 17:13:45 +02:00
parent ac34c5852b
commit f43aa995a8
2 changed files with 11 additions and 2 deletions

View File

@ -277,6 +277,7 @@ GainMeterBase::setup_meters (int len)
switch (_width) {
case Wide:
meter_metric_area.set_size_request(24, -1);
meter_ticks1_area.show();
meter_ticks2_area.show();
if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
@ -285,6 +286,7 @@ GainMeterBase::setup_meters (int len)
break;
case Narrow:
meter_width = 2;
meter_metric_area.set_size_request(20, -1);
meter_ticks1_area.hide();
meter_ticks2_area.hide();
break;
@ -987,8 +989,14 @@ int
GainMeter::get_gm_width ()
{
Gtk::Requisition sz;
hbox.size_request (sz);
return sz.width;
int min_w = 0;
meter_metric_area.size_request (sz);
min_w += sz.width;
level_meter->size_request (sz);
min_w += sz.width;
fader_alignment.size_request (sz);
return max(sz.width * 2, min_w * 2) + 6;
}
gint

View File

@ -647,6 +647,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
gpm.short_astyle_string(gain_automation->automation_style()));
gpm.gain_automation_state_button.set_text (
gpm.short_astate_string(gain_automation->automation_state()));
gain_meter().setup_meters (); // recalc meter width
if (_route->panner()) {
((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (