Trick 17: share separator + border:
This effectively adds a line after the last track.
This commit is contained in:
parent
cb05e3a21d
commit
795451a697
@ -120,7 +120,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||||||
CANVAS_DEBUG_NAME (_base_rect, string_compose ("base rect for %1", _name));
|
CANVAS_DEBUG_NAME (_base_rect, string_compose ("base rect for %1", _name));
|
||||||
_base_rect->set_x1 (ArdourCanvas::COORD_MAX);
|
_base_rect->set_x1 (ArdourCanvas::COORD_MAX);
|
||||||
_base_rect->set_outline_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackOutline());
|
_base_rect->set_outline_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackOutline());
|
||||||
_base_rect->set_outline_what (ArdourCanvas::Rectangle::What (0));
|
_base_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM); // bottom separator
|
||||||
_base_rect->set_fill_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackFill());
|
_base_rect->set_fill_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackFill());
|
||||||
_base_rect->set_data ("trackview", this);
|
_base_rect->set_data ("trackview", this);
|
||||||
_base_rect->Event.connect (sigc::bind (sigc::mem_fun (_editor, &PublicEditor::canvas_automation_track_event), _base_rect, this));
|
_base_rect->Event.connect (sigc::bind (sigc::mem_fun (_editor, &PublicEditor::canvas_automation_track_event), _base_rect, this));
|
||||||
|
@ -71,8 +71,8 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Container* canvas_g
|
|||||||
|
|
||||||
canvas_rect = new ArdourCanvas::Rectangle (_canvas_group);
|
canvas_rect = new ArdourCanvas::Rectangle (_canvas_group);
|
||||||
CANVAS_DEBUG_NAME (canvas_rect, string_compose ("SV canvas rectangle %1", _trackview.name()));
|
CANVAS_DEBUG_NAME (canvas_rect, string_compose ("SV canvas rectangle %1", _trackview.name()));
|
||||||
canvas_rect->set (ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, tv.current_height ()));
|
canvas_rect->set (ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, tv.current_height () -1));
|
||||||
canvas_rect->set_outline_what (ArdourCanvas::Rectangle::What (0));
|
canvas_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM); // bottom separator
|
||||||
canvas_rect->set_outline_color (RGBA_TO_UINT (0, 0, 0, 255));
|
canvas_rect->set_outline_color (RGBA_TO_UINT (0, 0, 0, 255));
|
||||||
canvas_rect->set_fill (true);
|
canvas_rect->set_fill (true);
|
||||||
canvas_rect->Event.connect (sigc::bind (sigc::mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
|
canvas_rect->Event.connect (sigc::bind (sigc::mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
|
||||||
@ -119,12 +119,12 @@ StreamView::set_height (double h)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canvas_rect->y1() == h) {
|
if (canvas_rect->y1() == h /* -1 */) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
height = h;
|
height = h;
|
||||||
canvas_rect->set_y1 (height);
|
canvas_rect->set_y1 (height /* -1 */); // share the separator with outline
|
||||||
update_contents_height ();
|
update_contents_height ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -291,7 +291,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||||||
|
|
||||||
if (_y_position != y) {
|
if (_y_position != y) {
|
||||||
_canvas_separator->set (ArdourCanvas::Duple(0, y), ArdourCanvas::Duple(ArdourCanvas::COORD_MAX, y));
|
_canvas_separator->set (ArdourCanvas::Duple(0, y), ArdourCanvas::Duple(ArdourCanvas::COORD_MAX, y));
|
||||||
_canvas_display->set_y_position (y + 1); // XXX
|
_canvas_display->set_y_position (y + 1);
|
||||||
_y_position = y;
|
_y_position = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,7 +892,7 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
|||||||
|
|
||||||
x1 = _editor.sample_to_pixel (start);
|
x1 = _editor.sample_to_pixel (start);
|
||||||
x2 = _editor.sample_to_pixel (start + cnt - 1);
|
x2 = _editor.sample_to_pixel (start + cnt - 1);
|
||||||
y2 = current_height();
|
y2 = current_height() - 1;
|
||||||
|
|
||||||
rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
|
rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user