fiddle with single pixel adjustments to time axis view item heights; fix region gain envelope visibility
This commit is contained in:
parent
737aae908a
commit
0bcf3001f5
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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()) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user