diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 0e4feff541..52be42a871 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -380,6 +380,13 @@ GainMeterBase::setup_meters (int len) meter_channels = route()->shared_peak_meter()->input_streams().n_total(); } + if (len == 0) { + assert (gain_slider); + Gtk::Requisition sz; + sz = gain_slider->size_request (); + len = gain_slider->orientation () == FaderWidget::VERT ? sz.height : sz.width; + } + switch (_width) { case Wide: //meter_ticks1_area.show(); diff --git a/libs/widgets/widgets/fader_widget.h b/libs/widgets/widgets/fader_widget.h index 46b9022a59..baff3d9cbb 100644 --- a/libs/widgets/widgets/fader_widget.h +++ b/libs/widgets/widgets/fader_widget.h @@ -52,6 +52,8 @@ public: void set_tweaks (Tweaks); Tweaks tweaks() const { return _tweaks; } + int orientation () const { return _orien; } + virtual void set_bg (Gtkmm2ext::Color) = 0; virtual void set_fg (Gtkmm2ext::Color) = 0; virtual void unset_bg () = 0;