13
0

Use global clip level from prefs. Restore clip colour, \

This commit is contained in:
nick_m 2014-06-09 02:50:14 +10:00
parent 7a05dde39d
commit e495577f98
2 changed files with 3 additions and 12 deletions

View File

@ -1164,6 +1164,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
wave->set_height (ht); wave->set_height (ht);
wave->set_samples_per_pixel (samples_per_pixel); wave->set_samples_per_pixel (samples_per_pixel);
wave->set_show_zero_line (true); wave->set_show_zero_line (true);
wave->set_clip_level (Config->get_waveform_clip_level ());
switch (Config->get_waveform_shape()) { switch (Config->get_waveform_shape()) {
case Rectified: case Rectified:

View File

@ -460,9 +460,8 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
*/ */
if (_global_show_waveform_clipping) { if (_global_show_waveform_clipping) {
set_source_rgba (context, _clip_color);
set_source_rgba (context, _outline_color);
/* the height of the clip-indicator should be at most 7 pixels, /* the height of the clip-indicator should be at most 7 pixels,
or 5% of the height of the waveview item. or 5% of the height of the waveview item.
*/ */
@ -475,25 +474,16 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
tips[i].clip_max; tips[i].clip_max;
if (show_top_clip) { if (show_top_clip) {
set_source_rgba (context, _clip_color);
context->rel_line_to (0, clip_height); context->rel_line_to (0, clip_height);
set_source_rgba (context, _outline_color);
} else {
context->rel_line_to (0, 1.0);
} }
if (_shape != WaveView::Rectified) { if (_shape != WaveView::Rectified) {
context->move_to (i, tips[i].bot); context->move_to (i, tips[i].bot);
if (tips[i].clip_min) { if (tips[i].clip_min) {
set_source_rgba (context, _clip_color);
context->rel_line_to (0, -clip_height); context->rel_line_to (0, -clip_height);
set_source_rgba (context, _outline_color);
} else {
context->rel_line_to (0, -1.0);
} }
} }
} }
context->stroke (); context->stroke ();
} }