Revert "cont'd work on automation-track headers (amend ba53af1c5
)"
This reverts commit beb5e3e777
.
This commit is contained in:
parent
dc4ee8196f
commit
70358639de
@ -486,7 +486,7 @@ AudioRegionView::set_height (gdouble height)
|
||||
ht = (((height - 2 * wcnt) - NAME_HIGHLIGHT_SIZE) / (double) wcnt);
|
||||
}
|
||||
|
||||
gdouble yoff = 1 + n * (ht + 1);
|
||||
gdouble yoff = n * (ht + 1);
|
||||
|
||||
waves[n]->set_height (ht);
|
||||
waves[n]->set_y_position (yoff + 2);
|
||||
@ -1132,7 +1132,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
|
||||
ht = ((trackview.current_height() - NAME_HIGHLIGHT_SIZE) / (double) nchans);
|
||||
}
|
||||
|
||||
gdouble yoff = 1 + which * ht;
|
||||
gdouble yoff = which * ht;
|
||||
|
||||
WaveView *wave = new WaveView (group, audio_region ());
|
||||
CANVAS_DEBUG_NAME (wave, string_compose ("wave view for chn %1 of %2", which, get_item_name()));
|
||||
|
@ -120,7 +120,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
CANVAS_DEBUG_NAME (_base_rect, string_compose ("base rect for %1", _name));
|
||||
_base_rect->set_x1 (ArdourCanvas::COORD_MAX);
|
||||
_base_rect->set_outline_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackOutline());
|
||||
_base_rect->set_outline_what (ArdourCanvas::Rectangle::TOP);
|
||||
_base_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
|
||||
_base_rect->set_fill_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackFill());
|
||||
_base_rect->set_data ("trackview", this);
|
||||
_base_rect->Event.connect (sigc::bind (sigc::mem_fun (_editor, &PublicEditor::canvas_automation_track_event), _base_rect, this));
|
||||
|
@ -769,7 +769,7 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
|
||||
if (_brushing) {
|
||||
_editor->mouse_brush_insert_region (rv, pending_region_position);
|
||||
} else {
|
||||
Duple track_origin (0, 1);
|
||||
Duple track_origin;
|
||||
|
||||
/* Get the y coordinate of the top of the track that this region is now over */
|
||||
track_origin = current_tv->canvas_display()->item_to_canvas (track_origin);
|
||||
|
@ -44,7 +44,7 @@ GhostRegion::GhostRegion (ArdourCanvas::Container* parent, TimeAxisView& tv, Tim
|
||||
{
|
||||
group = new ArdourCanvas::Container (parent);
|
||||
CANVAS_DEBUG_NAME (group, "ghost region");
|
||||
group->set_position (ArdourCanvas::Duple (initial_pos, 1));
|
||||
group->set_position (ArdourCanvas::Duple (initial_pos, 0));
|
||||
|
||||
base_rect = new ArdourCanvas::Rectangle (group);
|
||||
CANVAS_DEBUG_NAME (base_rect, "ghost region rect");
|
||||
|
@ -675,7 +675,7 @@ RegionView::region_sync_changed ()
|
||||
sync_mark->set (points);
|
||||
sync_mark->show ();
|
||||
|
||||
sync_line->set (ArdourCanvas::Duple (offset, 0), ArdourCanvas::Duple (offset, trackview.current_height() - NAME_HIGHLIGHT_SIZE - 1));
|
||||
sync_line->set (ArdourCanvas::Duple (offset, 0), ArdourCanvas::Duple (offset, trackview.current_height() - NAME_HIGHLIGHT_SIZE));
|
||||
sync_line->show ();
|
||||
}
|
||||
}
|
||||
@ -748,18 +748,16 @@ RegionView::set_height (double h)
|
||||
|
||||
sync_line->set (
|
||||
ArdourCanvas::Duple (offset, 0),
|
||||
ArdourCanvas::Duple (offset, h - NAME_HIGHLIGHT_SIZE - 1)
|
||||
ArdourCanvas::Duple (offset, h - NAME_HIGHLIGHT_SIZE)
|
||||
);
|
||||
}
|
||||
|
||||
for (list<ArdourCanvas::Rectangle*>::iterator i = _coverage_frames.begin(); i != _coverage_frames.end(); ++i) {
|
||||
(*i)->set_y0 (1);
|
||||
(*i)->set_y1 (h);
|
||||
(*i)->set_y1 (h + 1);
|
||||
}
|
||||
|
||||
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin(); i != _silent_frames.end(); ++i) {
|
||||
(*i)->set_y0 (1);
|
||||
(*i)->set_y1 (h);
|
||||
(*i)->set_y1 (h + 1);
|
||||
}
|
||||
|
||||
}
|
||||
@ -814,7 +812,7 @@ RegionView::update_coverage_frames (LayerDisplay d)
|
||||
_coverage_frames.push_back (cr);
|
||||
cr->set_x0 (trackview.editor().sample_to_pixel (t - position));
|
||||
cr->set_y0 (1);
|
||||
cr->set_y1 (_height);
|
||||
cr->set_y1 (_height + 1);
|
||||
cr->set_outline (false);
|
||||
cr->set_ignore_events (true);
|
||||
if (new_me) {
|
||||
|
@ -72,7 +72,7 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Container* canvas_g
|
||||
canvas_rect = new ArdourCanvas::Rectangle (_canvas_group);
|
||||
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_outline_what (ArdourCanvas::Rectangle::TOP);
|
||||
canvas_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
|
||||
canvas_rect->set_outline_color (RGBA_TO_UINT (0, 0, 0, 255));
|
||||
canvas_rect->set_fill (true);
|
||||
canvas_rect->Event.connect (sigc::bind (sigc::mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
|
||||
@ -608,7 +608,7 @@ StreamView::update_contents_height ()
|
||||
case Stacked:
|
||||
case Expanded:
|
||||
/* In stacked displays, the recregion is always at the top */
|
||||
i->rectangle->set_y0 (1);
|
||||
i->rectangle->set_y0 (0);
|
||||
i->rectangle->set_y1 (h);
|
||||
break;
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -166,7 +166,6 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
|
||||
group = new ArdourCanvas::Container (parent);
|
||||
CANVAS_DEBUG_NAME (group, string_compose ("TAVI group for %1", get_item_name()));
|
||||
group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
|
||||
group->set_y_position (1);
|
||||
|
||||
fill_color = base_color;
|
||||
samples_per_pixel = fpp;
|
||||
@ -1019,7 +1018,7 @@ TimeAxisViewItem::idle_remove_this_item(TimeAxisViewItem* item, void* src)
|
||||
void
|
||||
TimeAxisViewItem::set_y (double y)
|
||||
{
|
||||
group->set_y_position (y + 1);
|
||||
group->set_y_position (y);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user