diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2017-07-19 15:36:21 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2017-07-19 15:37:59 -0500 |
commit | 394b30fe42bba5f7184e4103e7bbc19197e84393 (patch) | |
tree | 1ed42a024b15cbdf4d33a93dd73480fd72d91785 /gtk2_ardour/editor_summary.cc | |
parent | 53fba8326c7ab5d64d5f72f952674e34137dfaab (diff) |
Editor Summary: Tweaks
* Only draw track bg lines if they will actually be recognizable.
* limit zoom-in capability of the summary box until it works correctly.
Diffstat (limited to 'gtk2_ardour/editor_summary.cc')
-rw-r--r-- | gtk2_ardour/editor_summary.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index 47f856cbbd..5ad7d8bde1 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -183,12 +183,14 @@ EditorSummary::render_background_image () /* paint a non-bg colored strip to represent the track itself */ - cairo_set_source_rgb (cr, 0.2, 0.2, 0.2); - cairo_set_line_width (cr, _track_height - 1); - cairo_move_to (cr, 0, y + _track_height / 2); - cairo_line_to (cr, get_width(), y + _track_height / 2); - cairo_stroke (cr); - + if ( _track_height > 4 ) { + cairo_set_source_rgb (cr, 0.2, 0.2, 0.2); + cairo_set_line_width (cr, _track_height - 1); + cairo_move_to (cr, 0, y + _track_height / 2); + cairo_line_to (cr, get_width(), y + _track_height / 2); + cairo_stroke (cr); + } + StreamView* s = (*i)->view (); if (s) { @@ -575,14 +577,16 @@ EditorSummary::summary_zoom_step ( int steps /* positive steps to zoom "out" , n pair<double, double> xn; get_editor (&xn); -// { -// xn.first = (_editor->leftmost_sample () - _start) * _x_scale; -// xn.second = xn.first + _editor->current_page_samples() * _x_scale; -// } xn.first -= steps; xn.second += steps; + //for now, disallow really close zooming-in from the scroomer. ( currently it causes the start-offset to 'walk' because of integer limitations. to fix this, probably need to maintain float throught the get/set_editor() path ) + if (steps<0) { + if ( (xn.second-xn.first) < 2) + return; + } + set_overlays_dirty (); set_editor_x (xn); } |