diff --git a/gtk2_ardour/compact_meter_bridge.h b/gtk2_ardour/compact_meter_bridge.h index 8c1e3c882b..a0889159d9 100644 --- a/gtk2_ardour/compact_meter_bridge.h +++ b/gtk2_ardour/compact_meter_bridge.h @@ -67,7 +67,6 @@ class CompactMeterbridge : std::map , CompactMeterStrip*> _strips; mutable Glib::Threads::Mutex _resync_mutex; - }; #endif //__ardour_compact_meter_bridge_h__ diff --git a/gtk2_ardour/compact_meter_strip.cc b/gtk2_ardour/compact_meter_strip.cc index e76225b9f5..fcfefd1450 100644 --- a/gtk2_ardour/compact_meter_strip.cc +++ b/gtk2_ardour/compact_meter_strip.cc @@ -33,7 +33,6 @@ using namespace std; using namespace ArdourMeter; PBD::Signal1 CompactMeterStrip::CatchDeletion; -int CompactMeterStrip::__meter_width = 4; CompactMeterStrip::CompactMeterStrip (Session* sess, boost::shared_ptr rt) : EventBox() @@ -43,13 +42,16 @@ CompactMeterStrip::CompactMeterStrip (Session* sess, boost::shared_ptrroot (), "meterwidth", 1)) + , _thin_meter_width (xml_property (*xml_tree ()->root (), "thinmeterwidth", 1)) { set_attributes (*this, *xml_tree ()->root (), XMLNodeMap ()); _level_meter.set_meter (_route->shared_peak_meter().get()); _level_meter.clear_meters(); _level_meter.set_type (_route->meter_type()); - _level_meter.setup_meters (__meter_width, __meter_width); + int width = (_route->n_inputs().n_total() < 2 ) ? _meter_width : _thin_meter_width; + _level_meter.setup_meters (width, width); _level_meter_home.add (_level_meter); _route->shared_peak_meter()->ConfigurationChanged.connect (_route_connections, @@ -125,6 +127,7 @@ CompactMeterStrip::fast_update () void CompactMeterStrip::meter_configuration_changed (ChanCount c) { - _level_meter.setup_meters (__meter_width, __meter_width); + int width = (c.n_total() < 2 ) ? _meter_width : _thin_meter_width; + _level_meter.setup_meters (width, width); } diff --git a/gtk2_ardour/compact_meter_strip.h b/gtk2_ardour/compact_meter_strip.h index e48853dee7..62b4ce903b 100644 --- a/gtk2_ardour/compact_meter_strip.h +++ b/gtk2_ardour/compact_meter_strip.h @@ -52,7 +52,8 @@ class CompactMeterStrip : public Gtk::EventBox, public WavesUI LevelMeterHBox _level_meter; Gtk::EventBox& _record_indicator; PBD::ScopedConnectionList _route_connections; - static int __meter_width; + int _meter_width; + int _thin_meter_width; size_t _serial_number; void meter_configuration_changed (ARDOUR::ChanCount); void update_rec_display (); diff --git a/gtk2_ardour/ui/compact_meter_bridge.xml b/gtk2_ardour/ui/compact_meter_bridge.xml index 6fa2ba7c6f..54a171a442 100644 --- a/gtk2_ardour/ui/compact_meter_bridge.xml +++ b/gtk2_ardour/ui/compact_meter_bridge.xml @@ -14,7 +14,7 @@ - + diff --git a/gtk2_ardour/ui/compact_meter_strip.xml b/gtk2_ardour/ui/compact_meter_strip.xml index 0bad97080b..1d43d75e09 100644 --- a/gtk2_ardour/ui/compact_meter_strip.xml +++ b/gtk2_ardour/ui/compact_meter_strip.xml @@ -1,6 +1,8 @@ - +