new_snap: Snapped Cursor ( squashed commit )

Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences:  snap_threshold and show_snap_cursor.
This commit is contained in:
Ben Loftis 2018-02-09 08:21:45 -06:00
parent 70d8300cb2
commit c6eab71435
14 changed files with 122 additions and 48 deletions

View file

@ -151,6 +151,7 @@ void
MiniTimeline::set_colors ()
{
// TODO UIConfiguration::instance().color & font
_phead_color = UIConfiguration::instance().color ("play head");
}
void
@ -648,7 +649,8 @@ MiniTimeline::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_
/* playhead on top */
int xc = width * 0.5f;
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgb (cr, 1, 0, 0); // playhead color
double r,g,b,a; Gtkmm2ext::color_to_rgba(_phead_color, r,g,b,a);
cairo_set_source_rgb (cr, r,g,b); // playhead color
cairo_move_to (cr, xc - .5, 0);
cairo_rel_line_to (cr, 0, height);
cairo_stroke (cr);