From 4fca993a840368e8313827676f7a63e1c79af32d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 8 Feb 2011 14:09:20 +0000 Subject: [PATCH] Tidy up region view colouring code slightly. git-svn-id: svn://localhost/ardour2/branches/3.0@8770 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_region_view.cc | 16 ++-------------- gtk2_ardour/time_axis_view_item.cc | 6 +++++- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index e6028c61a8..b72d95ca15 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1318,13 +1318,9 @@ AudioRegionView::set_frame_color () fill_opacity = 0; } - if (_selected) { - if (fill_opacity) { - frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), fill_opacity); - } else { - frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(); - } + TimeAxisViewItem::set_frame_color (); + if (_selected) { for (vector::iterator w = waves.begin(); w != waves.end(); ++w) { if (_region->muted()) { (*w)->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_SelectedWaveForm.get(), MUTED_ALPHA); @@ -1335,8 +1331,6 @@ AudioRegionView::set_frame_color () } } else { if (_recregion) { - frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get(); - for (vector::iterator w = waves.begin(); w != waves.end(); ++w) { if (_region->muted()) { (*w)->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_RecWaveForm.get(), MUTED_ALPHA); @@ -1346,12 +1340,6 @@ AudioRegionView::set_frame_color () } } } else { - if (fill_opacity) { - frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_FrameBase.get(), fill_opacity); - } else { - frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameBase.get(); - } - for (vector::iterator w = waves.begin(); w != waves.end(); ++w) { if (_region->muted()) { (*w)->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA); diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index a864310a8a..f0dd9a7984 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -683,7 +683,11 @@ TimeAxisViewItem::set_frame_color() } if (_selected) { - frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(); + if (fill_opacity) { + frame->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), fill_opacity); + } else { + frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(); + } } else { if (_recregion) { frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();