summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_time_axis.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-07-02 22:58:24 +0200
committerRobin Gareus <robin@gareus.org>2013-07-10 15:27:04 +0200
commit2a534de27244d00ecfcb179c9a26c5a1aec017af (patch)
treecb78fdc5a6955df0e104bd6d194729f1c353c54c /gtk2_ardour/route_time_axis.cc
parent08167d6ac45f9577a09c65b7a66de85e980a8f3b (diff)
double width of mono-meters in track-header
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r--gtk2_ardour/route_time_axis.cc22
1 files changed, 18 insertions, 4 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 44d21c39ad..6cb6d451a0 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -43,6 +43,7 @@
#include <gtkmm2ext/utils.h>
#include "ardour/amp.h"
+#include "ardour/meter.h"
#include "ardour/event_type_map.h"
#include "ardour/processor.h"
#include "ardour/profile.h"
@@ -112,9 +113,13 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
{
RouteUI::set_route (rt);
+ int meter_width = 3;
+ if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
+ meter_width = 6;
+ }
gm.set_controls (_route, _route->shared_peak_meter(), _route->amp());
gm.get_level_meter().set_no_show_all();
- gm.get_level_meter().setup_meters(50);
+ gm.get_level_meter().setup_meters(50, meter_width);
gm.update_gain_sensitive ();
string str = gui_property ("height");
@@ -829,9 +834,14 @@ RouteTimeAxisView::show_selection (TimeSelection& ts)
void
RouteTimeAxisView::set_height (uint32_t h)
{
- int gmlen = h - 5;
+ int gmlen = h - 7;
bool height_changed = (height == 0) || (h != height);
- gm.get_level_meter().setup_meters (gmlen);
+
+ int meter_width = 3;
+ if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
+ meter_width = 6;
+ }
+ gm.get_level_meter().setup_meters (gmlen, meter_width);
TimeAxisView::set_height (h);
@@ -2228,7 +2238,11 @@ void
RouteTimeAxisView::reset_meter ()
{
if (Config->get_show_track_meters()) {
- gm.get_level_meter().setup_meters (height-5);
+ int meter_width = 3;
+ if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
+ meter_width = 6;
+ }
+ gm.get_level_meter().setup_meters (height-7, meter_width);
} else {
hide_meter ();
}