X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fstreamview.cc;h=bceaf09f99a5e21063e34ea26b5e6bf1da836842;hb=ce6c41c060c700489a9ac9fc5080bf2920c17ae2;hp=862efdb4c574c2b435de613bf8f09663c5091965;hpb=af707897735a34ab1a82c7307dc61b12c14027a9;p=ardour.git diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 862efdb4c5..bceaf09f99 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -275,7 +275,7 @@ StreamView::remove_rec_region (Region *r) { ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r)); - if (!Gtkmm2ext::UI::instance()->caller_is_gui_thread()) { + if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) { fatal << "region deleted from non-GUI thread!" << endmsg; /*NOTREACHED*/ } @@ -666,14 +666,21 @@ StreamView::setup_rec_box () jack_nframes_t frame_pos = ds.current_capture_start (); gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos); gdouble xend; + uint32_t fill_color; switch (_trackview.audio_track()->mode()) { case Normal: xend = xstart; + fill_color = color_map[cRecordingRectFill]; break; case Destructive: xend = xstart + 2; + fill_color = color_map[cRecordingRectFill]; + /* make the recording rect translucent to allow + the user to see the peak data coming in, etc. + */ + fill_color = UINT_RGBA_CHANGE_A (fill_color, 120); break; } @@ -683,7 +690,7 @@ StreamView::setup_rec_box () rec_rect->property_x2() = xend; rec_rect->property_y2() = (double) _trackview.height - 1; rec_rect->property_outline_color_rgba() = color_map[cRecordingRectOutline]; - rec_rect->property_fill_color_rgba() = color_map[cRecordingRectFill]; + rec_rect->property_fill_color_rgba() = fill_color; RecBoxInfo recbox; recbox.rectangle = rec_rect; @@ -776,8 +783,8 @@ StreamView::update_rec_box () case Destructive: rect.length = 2; - xstart = _trackview.editor.frame_to_pixel (at); - xend = xstart + 2; + xstart = _trackview.editor.frame_to_pixel (_trackview.get_diskstream()->current_capture_start()); + xend = _trackview.editor.frame_to_pixel (at); break; }