update track-header layout - proper padding around meters

This commit is contained in:
Robin Gareus 2013-07-03 07:36:15 +02:00
parent 95e163a466
commit aabe526df2
2 changed files with 12 additions and 9 deletions

View file

@ -186,8 +186,11 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
} else {
gm.set_fader_name ("AudioBusFader");
}
controls_hbox.pack_start(gm.get_level_meter(), false, false, 2);
Gtk::VBox *mtrbox = manage(new Gtk::VBox());
mtrbox->pack_start(gm.get_level_meter(), false, false, 2);
controls_hbox.pack_start(*mtrbox, false, false, 4);
_route->meter_change.connect (*this, invalidator (*this), bind (&RouteTimeAxisView::meter_changed, this), gui_context());
_route->input()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
_route->output()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
@ -834,7 +837,7 @@ RouteTimeAxisView::show_selection (TimeSelection& ts)
void
RouteTimeAxisView::set_height (uint32_t h)
{
int gmlen = h - 7;
int gmlen = h - 9;
bool height_changed = (height == 0) || (h != height);
int meter_width = 3;
@ -2242,7 +2245,7 @@ RouteTimeAxisView::reset_meter ()
if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
meter_width = 6;
}
gm.get_level_meter().setup_meters (height-7, meter_width);
gm.get_level_meter().setup_meters (height - 9, meter_width);
} else {
hide_meter ();
}

View file

@ -138,8 +138,11 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
controls_vbox.pack_start (controls_table, false, false);
controls_vbox.show ();
controls_hbox.pack_start (controls_vbox, true, true);
controls_hbox.show ();
//controls_ebox.set_name ("TimeAxisViewControlsBaseUnselected");
controls_ebox.add (controls_vbox);
controls_ebox.add (controls_hbox);
controls_ebox.add_events (Gdk::BUTTON_PRESS_MASK|
Gdk::BUTTON_RELEASE_MASK|
Gdk::POINTER_MOTION_MASK|
@ -156,11 +159,8 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
controls_ebox.signal_leave_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_leave));
controls_ebox.show ();
controls_hbox.pack_start (controls_ebox, true, true);
controls_hbox.show ();
time_axis_vbox.pack_start (controls_hbox, true, true, 2);
time_axis_vbox.pack_end (*separator, false, false);
time_axis_vbox.pack_start (controls_ebox, true, true, 0);
time_axis_vbox.show();
ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));