diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-19 01:53:39 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-19 01:53:39 +0000 |
commit | ed9bdd08945def40da97448af36301452b1b01df (patch) | |
tree | 27bf90fb296cde7cd12920657cd2f3f05d71b3f1 /gtk2_ardour/audio_region_view.cc | |
parent | 86f7d4ef8735134fcb2a0abd065381370d028ab1 (diff) |
a ton of changes based on discussions at SAE; to be documented later
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2694 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 29becbdde6..10fdba8974 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1,7 +1,7 @@ /* Copyright (C) 2001-2006 Paul Davis - This program is free software; you can redistribute it and/or modify + This program is free software; you can r>edistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -1165,3 +1165,34 @@ AudioRegionView::color_handler () envelope_active_changed(); } +void +AudioRegionView::set_frame_color () +{ + if (!frame) { + return; + } + + if (_region->opaque()) { + fill_opacity = 130; + } else { + fill_opacity = 0; + } + + uint32_t r,g,b,a; + + if (_selected && should_show_selection) { + frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_WaveForm.get(); + + UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a); + for (vector<ArdourCanvas::WaveView*>::iterator w = waves.begin(); w != waves.end(); ++w) { + (*w)->property_wave_color() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a);// Lets still use the theme's opacity value if Opaque is not set + } + } else { + UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a); + frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a); + + for (vector<ArdourCanvas::WaveView*>::iterator w = waves.begin(); w != waves.end(); ++w) { + (*w)->property_wave_color() = ARDOUR_UI::config()->canvasvar_WaveForm.get(); + } + } +} |