summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/audio_region_view.cc4
-rw-r--r--gtk2_ardour/automation_time_axis.cc2
-rw-r--r--gtk2_ardour/editor_drag.cc2
-rw-r--r--gtk2_ardour/ghostregion.cc2
-rw-r--r--gtk2_ardour/region_view.cc12
-rw-r--r--gtk2_ardour/streamview.cc4
-rw-r--r--gtk2_ardour/time_axis_view.cc22
-rw-r--r--gtk2_ardour/time_axis_view_item.cc3
8 files changed, 26 insertions, 25 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 6c41272d93..8f5371adad 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -486,7 +486,7 @@ AudioRegionView::set_height (gdouble height)
ht = (((height - 2 * wcnt) - NAME_HIGHLIGHT_SIZE) / (double) wcnt);
}
- gdouble yoff = n * (ht + 1);
+ gdouble yoff = 1 + 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 = which * ht;
+ gdouble yoff = 1 + 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()));
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 50d82c26f9..f5592f1ce8 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -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::BOTTOM);
+ _base_rect->set_outline_what (ArdourCanvas::Rectangle::TOP);
_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));
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index eb130c5f29..c48376b4cb 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -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;
+ Duple track_origin (0, 1);
/* 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);
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc
index 759ffb94d2..054030b14f 100644
--- a/gtk2_ardour/ghostregion.cc
+++ b/gtk2_ardour/ghostregion.cc
@@ -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, 0));
+ group->set_position (ArdourCanvas::Duple (initial_pos, 1));
base_rect = new ArdourCanvas::Rectangle (group);
CANVAS_DEBUG_NAME (base_rect, "ghost region rect");
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index d45164ee42..6cd0bc3a3e 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -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));
+ sync_line->set (ArdourCanvas::Duple (offset, 0), ArdourCanvas::Duple (offset, trackview.current_height() - NAME_HIGHLIGHT_SIZE - 1));
sync_line->show ();
}
}
@@ -748,16 +748,18 @@ RegionView::set_height (double h)
sync_line->set (
ArdourCanvas::Duple (offset, 0),
- ArdourCanvas::Duple (offset, h - NAME_HIGHLIGHT_SIZE)
+ ArdourCanvas::Duple (offset, h - NAME_HIGHLIGHT_SIZE - 1)
);
}
for (list<ArdourCanvas::Rectangle*>::iterator i = _coverage_frames.begin(); i != _coverage_frames.end(); ++i) {
- (*i)->set_y1 (h + 1);
+ (*i)->set_y0 (1);
+ (*i)->set_y1 (h);
}
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin(); i != _silent_frames.end(); ++i) {
- (*i)->set_y1 (h + 1);
+ (*i)->set_y0 (1);
+ (*i)->set_y1 (h);
}
}
@@ -812,7 +814,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 + 1);
+ cr->set_y1 (_height);
cr->set_outline (false);
cr->set_ignore_events (true);
if (new_me) {
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc
index 9eecc80dd7..a6a4b5d007 100644
--- a/gtk2_ardour/streamview.cc
+++ b/gtk2_ardour/streamview.cc
@@ -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::BOTTOM);
+ canvas_rect->set_outline_what (ArdourCanvas::Rectangle::TOP);
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 (0);
+ i->rectangle->set_y0 (1);
i->rectangle->set_y1 (h);
break;
}
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 673488acb5..31b5e2f145 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -280,9 +280,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
_order = nth;
if (_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);
+ _canvas_display->set_y_position (y);
_y_position = y;
}
@@ -845,9 +843,9 @@ TimeAxisView::hide_timestretch ()
void
TimeAxisView::show_selection (TimeSelection& ts)
{
+ double x0;
double x1;
- double x2;
- double y2;
+ double y1;
SelectionRect *rect; time_axis_frame.show();
@@ -879,17 +877,17 @@ TimeAxisView::show_selection (TimeSelection& ts)
rect = get_selection_rect ((*i).id);
- x1 = _editor.sample_to_pixel (start);
- x2 = _editor.sample_to_pixel (start + cnt - 1);
- y2 = current_height() - 1;
+ x0 = _editor.sample_to_pixel (start);
+ x1 = _editor.sample_to_pixel (start + cnt - 1);
+ y1 = current_height();
- rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
+ rect->rect->set (ArdourCanvas::Rect (x0, 1, x1, y1));
// trim boxes are at the top for selections
- 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));
+ 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));
rect->start_trim->show();
rect->end_trim->show();
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 74651f67f6..a2e38c1559 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -166,6 +166,7 @@ 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;
@@ -1018,7 +1019,7 @@ TimeAxisViewItem::idle_remove_this_item(TimeAxisViewItem* item, void* src)
void
TimeAxisViewItem::set_y (double y)
{
- group->set_y_position (y);
+ group->set_y_position (y + 1);
}
void