diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-14 17:19:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-14 17:19:58 +0000 |
commit | 517d411bb013d27f0df188584bbfa684438cc544 (patch) | |
tree | 46662c4cc005a8007f8aed65ae9b76d3deafbd42 /gtk2_ardour/streamview.cc | |
parent | 898fba7b54b19ffddb47fd384c9b04115bc449d9 (diff) |
new color management design starts to take shape (canvas color only for now)
git-svn-id: svn://localhost/trunk/ardour2@326 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/streamview.cc')
-rw-r--r-- | gtk2_ardour/streamview.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 91a34de755..f6426836f1 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -25,6 +25,7 @@ #include "rgb_macros.h" #include "gui_thread.h" #include "utils.h" +#include "color.h" using namespace ARDOUR; using namespace Editing; @@ -74,6 +75,8 @@ StreamView::StreamView (AudioTimeAxisView& tv) rec_active = false; use_rec_regions = tv.editor.show_waveforms_recording (); last_rec_peak_frame = 0; + + ColorChanged.connect (mem_fun (*this, &StreamView::color_handler)); } StreamView::~StreamView () @@ -918,3 +921,26 @@ StreamView::reveal_xfades_involving (AudioRegionView& rv) } } } + +void +StreamView::color_handler (ColorID id, uint32_t val) +{ + switch (id) { + case cAudioTrackBase: + if (_trackview.is_audio_track()) { + canvas_rect->property_fill_color_rgba() = val; + } + break; + case cAudioBusBase: + if (!_trackview.is_audio_track()) { + canvas_rect->property_fill_color_rgba() = val; + } + break; + case cAudioTrackOutline: + canvas_rect->property_outline_color_rgba() = val; + break; + + default: + break; + } +} |