summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-02-25 11:35:55 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-25 12:02:50 -0500
commit0bcf3001f5d071dacb9231be4f9956cfd4bb93d3 (patch)
tree7bb182a34015cfeef9b8e7df3e9c93ea74f819c3 /gtk2_ardour
parent737aae908af36ef6b4bd7592c514d2fa48638525 (diff)
fiddle with single pixel adjustments to time axis view item heights; fix region gain envelope visibility
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/audio_region_view.cc13
-rw-r--r--gtk2_ardour/automation_line.cc6
-rw-r--r--gtk2_ardour/ghostregion.cc4
-rw-r--r--gtk2_ardour/time_axis_view_item.cc12
4 files changed, 20 insertions, 15 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 23c84dc340..cb1d10b82a 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -449,7 +449,7 @@ void
AudioRegionView::setup_fade_handle_positions()
{
/* position of fade handle offset from the top of the region view */
- double const handle_pos = 1.0;
+ double const handle_pos = 0.0;
if (fade_in_handle) {
fade_in_handle->set_y0 (handle_pos);
@@ -572,6 +572,8 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f
effective_height = _height;
}
+ effective_height -= 1.0;
+
Points points;
points.assign (npoints, Duple());
@@ -583,7 +585,7 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f
for (pi = 0, pc = 0; pc < npoints; ++pc) {
points[pi].x = 1.0 + (pc * xdelta);
- points[pi++].y = 1.0 + effective_height - (curve[pc] * effective_height);
+ points[pi++].y = 1.0 + effective_height - (curve[pc] * effective_height);
}
/* draw the line */
@@ -653,6 +655,8 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
effective_height = _height;
}
+ effective_height -= 1.0;
+
/* points *MUST* be in anti-clockwise order */
Points points;
@@ -739,7 +743,7 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, frame
start_xfade_rect->set_data ("regionview", this);
}
- start_xfade_rect->set (ArdourCanvas::Rect (1.0, 1.0, rect_width, effective_height));
+ start_xfade_rect->set (ArdourCanvas::Rect (1.0, 0.0, rect_width, effective_height));
start_xfade_rect->show ();
start_xfade_in->set (points);
@@ -829,7 +833,7 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn
end_xfade_rect->set_data ("regionview", this);
}
- end_xfade_rect->set (ArdourCanvas::Rect (rect_edge, 1.0, rect_edge + rect_width + TimeAxisViewItem::RIGHT_EDGE_SHIFT, effective_height));
+ end_xfade_rect->set (ArdourCanvas::Rect (rect_edge, 0.0, rect_edge + rect_width + TimeAxisViewItem::RIGHT_EDGE_SHIFT, effective_height));
end_xfade_rect->show ();
end_xfade_in->set (points);
@@ -1373,6 +1377,7 @@ AudioRegionView::envelope_active_changed ()
gain_line->set_line_color (audio_region()->envelope_active() ?
ARDOUR_UI::config()->get_canvasvar_GainLine() :
ARDOUR_UI::config()->get_canvasvar_GainLineInactive());
+ update_envelope_visibility ();
}
}
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 5c5474346d..efba3999c8 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -1007,9 +1007,9 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
line->set (line_points);
- if (_visible && alist->interpolation() != AutomationList::Discrete) {
- line->show();
- }
+ /* despite the name, this may show or hide things */
+
+ show();
}
set_selected_points (trackview.editor().get_selection().points);
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc
index 5974f17bad..3bdc690044 100644
--- a/gtk2_ardour/ghostregion.cc
+++ b/gtk2_ardour/ghostregion.cc
@@ -49,8 +49,8 @@ GhostRegion::GhostRegion (ArdourCanvas::Group* parent, TimeAxisView& tv, TimeAxi
base_rect = new ArdourCanvas::Rectangle (group);
CANVAS_DEBUG_NAME (base_rect, "ghost region rect");
base_rect->set_x0 (0);
- base_rect->set_y0 (1.0);
- base_rect->set_y1 (trackview.current_height());
+ base_rect->set_y0 (0.0);
+ base_rect->set_y1 (trackview.current_height() - 1.0);
base_rect->set_outline_what (0);
if (!is_automation_ghost()) {
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 38f9aa02f1..cfdd032767 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -189,7 +189,7 @@ TimeAxisViewItem::init (ArdourCanvas::Group* parent, double fpp, Gdk::Color cons
if (visibility & ShowFrame) {
frame = new ArdourCanvas::Rectangle (group,
- ArdourCanvas::Rect (0.0, 1.0,
+ ArdourCanvas::Rect (0.0, 0.0,
trackview.editor().sample_to_pixel(duration) + RIGHT_EDGE_SHIFT,
trackview.current_height() - 1.0));
@@ -203,13 +203,13 @@ TimeAxisViewItem::init (ArdourCanvas::Group* parent, double fpp, Gdk::Color cons
frame->set_outline_color (ARDOUR_UI::config()->get_canvasvar_TimeAxisFrame());
}
- // frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::RIGHT|ArdourCanvas::Rectangle::LEFT));
+ frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::RIGHT|ArdourCanvas::Rectangle::LEFT));
} else {
frame = 0;
}
-
+
if (visibility & ShowNameHighlight) {
double width;
@@ -227,7 +227,7 @@ TimeAxisViewItem::init (ArdourCanvas::Group* parent, double fpp, Gdk::Color cons
ArdourCanvas::Rect (start,
trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE,
width - 2.0 + RIGHT_EDGE_SHIFT,
- trackview.current_height()));
+ trackview.current_height() - 1.0));
CANVAS_DEBUG_NAME (name_highlight, string_compose ("name highlight for %1", get_item_name()));
name_highlight->set_data ("timeaxisviewitem", this);
name_highlight->set_outline_what (ArdourCanvas::Rectangle::TOP);
@@ -610,7 +610,7 @@ TimeAxisViewItem::manage_name_highlight ()
name_highlight->show();
name_highlight->set_y0 ((double) _height - NAME_HIGHLIGHT_SIZE);
- name_highlight->set_y1 ((double) _height);
+ name_highlight->set_y1 ((double) _height - 1.0);
if (visibility & FullWidthNameHighlight) {
/* x0 is always 0.0 */
@@ -755,7 +755,7 @@ TimeAxisViewItem::set_colors()
set_frame_color();
if (name_highlight) {
- name_highlight->set_fill_color (fill_color);
+ name_highlight->set_fill_color (fill_color);
}
if (name_text) {