diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-04 16:14:01 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-04 16:14:01 +0200 |
commit | 70358639de97e011abff786a86b712cea283c0a4 (patch) | |
tree | 8e1c5f73b2ea4e7c4bd29c325feba99b61df529c /gtk2_ardour/time_axis_view.cc | |
parent | dc4ee8196f3cd5c310307152e0ff479e65a808fa (diff) |
Revert "cont'd work on automation-track headers (amend ba53af1c5)"
This reverts commit beb5e3e777b0e92e8dde7ee12c324b32c679ff63.
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index a30e024f9a..ee6208b681 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -280,7 +280,9 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent) _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; } @@ -843,9 +845,9 @@ TimeAxisView::hide_timestretch () void TimeAxisView::show_selection (TimeSelection& ts) { - double x0; double x1; - double y1; + double x2; + double y2; SelectionRect *rect; time_axis_frame.show(); @@ -877,17 +879,17 @@ TimeAxisView::show_selection (TimeSelection& ts) rect = get_selection_rect ((*i).id); - x0 = _editor.sample_to_pixel (start); - x1 = _editor.sample_to_pixel (start + cnt - 1); - y1 = current_height(); + x1 = _editor.sample_to_pixel (start); + x2 = _editor.sample_to_pixel (start + cnt - 1); + y2 = current_height() - 1; - rect->rect->set (ArdourCanvas::Rect (x0, 1, x1, y1)); + rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2)); // trim boxes are at the top for selections - if (x1 > x0) { - rect->start_trim->set (ArdourCanvas::Rect (x0, 1, x0 + trim_handle_size, y1)); - rect->end_trim->set (ArdourCanvas::Rect (x1 - trim_handle_size, 1, x1, y1)); + if (x2 > x1) { + rect->start_trim->set (ArdourCanvas::Rect (x1, 1, x1 + trim_handle_size, y2)); + rect->end_trim->set (ArdourCanvas::Rect (x2 - trim_handle_size, 1, x2, y2)); rect->start_trim->show(); rect->end_trim->show(); |