From c24f582df8ecd230b52d44089e620fc3f4ccaf6a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 1 Jul 2013 22:05:03 +0200 Subject: [PATCH] meterbridge: honor DPI, Color & Theme changes --- gtk2_ardour/meter_strip.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index 2635de9a09..61728fe5e0 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -33,6 +33,7 @@ #include #include "ardour_ui.h" +#include "global_signals.h" #include "logmeter.h" #include "gui_thread.h" #include "ardour_window.h" @@ -151,6 +152,8 @@ MeterStrip::MeterStrip (Meterbridge& mtr, Session* sess, boost::shared_ptrtheme_changed.connect (sigc::mem_fun(*this, &MeterStrip::on_theme_changed)); + ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); + DPIReset.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed)); } MeterStrip::~MeterStrip () @@ -231,6 +234,13 @@ void MeterStrip::on_theme_changed() { style_changed = true; + + // TODO save meter_width as private var?! + int meter_width = 6; + if (_route->shared_peak_meter()->input_streams().n_total() == 1) { + meter_width = 12; + } + level_meter->setup_meters (350, meter_width, 6); } void