dedicated TAV separator line
This commit is contained in:
parent
70358639de
commit
cb05e3a21d
@ -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::BOTTOM);
|
_base_rect->set_outline_what (ArdourCanvas::Rectangle::What (0));
|
||||||
_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));
|
||||||
|
@ -72,7 +72,7 @@ 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 ()));
|
||||||
canvas_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
|
canvas_rect->set_outline_what (ArdourCanvas::Rectangle::What (0));
|
||||||
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));
|
||||||
|
@ -106,10 +106,16 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||||||
compute_heights ();
|
compute_heights ();
|
||||||
}
|
}
|
||||||
|
|
||||||
_canvas_display = new ArdourCanvas::Container (ed.get_trackview_group (), ArdourCanvas::Duple (0.0, 0.0));
|
_canvas_display = new ArdourCanvas::Container (ed.get_trackview_group (), ArdourCanvas::Duple (1.0, 0.0));
|
||||||
CANVAS_DEBUG_NAME (_canvas_display, "main for TAV");
|
CANVAS_DEBUG_NAME (_canvas_display, "main for TAV");
|
||||||
_canvas_display->hide(); // reveal as needed
|
_canvas_display->hide(); // reveal as needed
|
||||||
|
|
||||||
|
_canvas_separator = new ArdourCanvas::Line(ed.get_trackview_group ());
|
||||||
|
CANVAS_DEBUG_NAME (_canvas_separator, "separator for TAV");
|
||||||
|
_canvas_separator->set_outline_color(RGBA_TO_UINT (0, 0, 0, 255));
|
||||||
|
_canvas_separator->set_outline_width(1.0);
|
||||||
|
_canvas_separator->hide();
|
||||||
|
|
||||||
selection_group = new ArdourCanvas::Container (_canvas_display);
|
selection_group = new ArdourCanvas::Container (_canvas_display);
|
||||||
CANVAS_DEBUG_NAME (selection_group, "selection for TAV");
|
CANVAS_DEBUG_NAME (selection_group, "selection for TAV");
|
||||||
selection_group->set_data (X_("timeselection"), (void *) 1);
|
selection_group->set_data (X_("timeselection"), (void *) 1);
|
||||||
@ -222,6 +228,9 @@ TimeAxisView::~TimeAxisView()
|
|||||||
delete _canvas_display;
|
delete _canvas_display;
|
||||||
_canvas_display = 0;
|
_canvas_display = 0;
|
||||||
|
|
||||||
|
delete _canvas_separator;
|
||||||
|
_canvas_separator = 0;
|
||||||
|
|
||||||
delete display_menu;
|
delete display_menu;
|
||||||
display_menu = 0;
|
display_menu = 0;
|
||||||
|
|
||||||
@ -236,6 +245,7 @@ TimeAxisView::hide ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
_canvas_display->hide ();
|
_canvas_display->hide ();
|
||||||
|
_canvas_separator->hide ();
|
||||||
|
|
||||||
if (control_parent) {
|
if (control_parent) {
|
||||||
control_parent->remove (time_axis_hbox);
|
control_parent->remove (time_axis_hbox);
|
||||||
@ -280,16 +290,17 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||||||
_order = nth;
|
_order = nth;
|
||||||
|
|
||||||
if (_y_position != y) {
|
if (_y_position != y) {
|
||||||
// XXX +1 is a quick hack to align the track-header with the canvas
|
_canvas_separator->set (ArdourCanvas::Duple(0, y), ArdourCanvas::Duple(ArdourCanvas::COORD_MAX, y));
|
||||||
// with the separator line at the top.
|
_canvas_display->set_y_position (y + 1); // XXX
|
||||||
_canvas_display->set_y_position (y + 1);
|
|
||||||
_y_position = y;
|
_y_position = y;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_canvas_display->raise_to_top ();
|
_canvas_display->raise_to_top ();
|
||||||
_canvas_display->show ();
|
_canvas_display->show ();
|
||||||
|
|
||||||
|
_canvas_separator->raise_to_top ();
|
||||||
|
_canvas_separator->show ();
|
||||||
|
|
||||||
_hidden = false;
|
_hidden = false;
|
||||||
|
|
||||||
_effective_height = current_height ();
|
_effective_height = current_height ();
|
||||||
@ -881,14 +892,14 @@ 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() - 1;
|
y2 = current_height();
|
||||||
|
|
||||||
rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
|
rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
|
||||||
|
|
||||||
// trim boxes are at the top for selections
|
// trim boxes are at the top for selections
|
||||||
|
|
||||||
if (x2 > x1) {
|
if (x2 > x1) {
|
||||||
rect->start_trim->set (ArdourCanvas::Rect (x1, 1, x1 + trim_handle_size, y2));
|
rect->start_trim->set (ArdourCanvas::Rect (x1, 0, x1 + trim_handle_size, y2));
|
||||||
rect->end_trim->set (ArdourCanvas::Rect (x2 - trim_handle_size, 1, x2, y2));
|
rect->end_trim->set (ArdourCanvas::Rect (x2 - trim_handle_size, 1, x2, y2));
|
||||||
|
|
||||||
rect->start_trim->show();
|
rect->start_trim->show();
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
#include "ardour/region.h"
|
#include "ardour/region.h"
|
||||||
#include "evoral/Parameter.hpp"
|
#include "evoral/Parameter.hpp"
|
||||||
|
|
||||||
|
#include "canvas/line.h"
|
||||||
|
|
||||||
#include "prompter.h"
|
#include "prompter.h"
|
||||||
#include "axis_view.h"
|
#include "axis_view.h"
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
@ -227,6 +229,7 @@ class TimeAxisView : public virtual AxisView
|
|||||||
bool _hidden;
|
bool _hidden;
|
||||||
bool in_destructor;
|
bool in_destructor;
|
||||||
Gtk::Menu* _size_menu;
|
Gtk::Menu* _size_menu;
|
||||||
|
ArdourCanvas::Line* _canvas_separator;
|
||||||
ArdourCanvas::Container* _canvas_display;
|
ArdourCanvas::Container* _canvas_display;
|
||||||
double _y_position;
|
double _y_position;
|
||||||
PublicEditor& _editor;
|
PublicEditor& _editor;
|
||||||
|
Loading…
Reference in New Issue
Block a user