diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-03 15:03:35 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-03 15:03:35 +0200 |
commit | ba53af1c50417cc28ff4aac8d72ff182d54f0896 (patch) | |
tree | f9ab1191724f68f427325af6b79bb55180583601 /gtk2_ardour/time_axis_view.cc | |
parent | 3814c65680322519f385e78ce0b7f1eef21ecf3b (diff) |
quick mockup of indented automation-track headers
XXX: If we keep this approach, TimeAxisView::show_at()
needs to be fixed.
TimeAxisView::_canvas_display should draw the separator
line at the top, and regions inside moved down 1px.
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 13b0546d46..673488acb5 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -184,9 +184,11 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie separator->set_size_request(-1, 1); separator->show(); + time_axis_vbox.pack_start (*separator, false, false); time_axis_vbox.pack_start (time_axis_frame, true, true); - time_axis_vbox.pack_end (*separator, false, false); time_axis_vbox.show(); + time_axis_hbox.pack_start (time_axis_vbox, true, true); + time_axis_hbox.show(); ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler)); @@ -236,7 +238,7 @@ TimeAxisView::hide () _canvas_display->hide (); if (control_parent) { - control_parent->remove (time_axis_vbox); + control_parent->remove (time_axis_hbox); control_parent = 0; } @@ -268,17 +270,19 @@ guint32 TimeAxisView::show_at (double y, int& nth, VBox *parent) { if (control_parent) { - control_parent->reorder_child (time_axis_vbox, nth); + control_parent->reorder_child (time_axis_hbox, nth); } else { control_parent = parent; - parent->pack_start (time_axis_vbox, false, false); - parent->reorder_child (time_axis_vbox, nth); + parent->pack_start (time_axis_hbox, false, false); + parent->reorder_child (time_axis_hbox, nth); } _order = nth; if (_y_position != y) { - _canvas_display->set_y_position (y); + // XXX +1 is a quick hack to align the track-header with the canvas + // with the separator line at the top. + _canvas_display->set_y_position (y + 1); _y_position = y; } @@ -530,7 +534,7 @@ TimeAxisView::set_height (uint32_t h) h = preset_height (HeightSmall); } - time_axis_vbox.property_height_request () = h; + time_axis_hbox.property_height_request () = h; height = h; char buf[32]; |