summaryrefslogtreecommitdiff
path: root/gtk2_ardour/streamview.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-03-17 20:24:26 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-03-17 20:24:26 +0000
commit46f5456853c1301901b9b57089bda856b7377072 (patch)
treefccf85c1c70d9c522a2e57ca269cf6acd5dc8c69 /gtk2_ardour/streamview.cc
parent5e836403adcb62a59141226baa32515ae7789661 (diff)
change rec box drawing for destructive tracks
git-svn-id: svn://localhost/trunk/ardour2@405 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/streamview.cc')
-rw-r--r--gtk2_ardour/streamview.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc
index 862efdb4c5..84e135d77c 100644
--- a/gtk2_ardour/streamview.cc
+++ b/gtk2_ardour/streamview.cc
@@ -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;
}