Opaque regions are supposed to be opaque

Multimedia / Ardour - Robin Gareus [gareus.org] - 13 December 2022 00:35 UTC



###

diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 2f3a937722..c976f1f874 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -375,14 +375,25 @@ AudioRegionView::fade_out_active_changed ()
uint32_t
AudioRegionView::get_fill_color () const
{
- Gtkmm2ext::Color f = TimeAxisViewItem::get_fill_color();
-
+ Gtkmm2ext::Color c;
const bool opaque = _region->opaque() || trackview.layer_display () == Stacked;

+ if (_selected) {
+ c = UIConfiguration::instance().color ("selected region base");
+ } else if (_recregion) {
+ return UIConfiguration::instance().color ("recording rect");
+ } else if (!UIConfiguration::instance().get_color_regions_using_track_color()) {
+ c = UIConfiguration::instance().color (fill_color_name);
+ } else {
+ c = fill_color;
+ }
+
if (opaque && ( !_dragging && !_region->muted () )) {
- return f;
+ return c;
+ } else if (_dragging) {
+ return UIConfiguration::instance().color_mod (c, "dragging region");
} else {
- return Gtkmm2ext::HSV(f).mod (UIConfiguration::instance().modifier ("transparent region base")).color ();
+ return Gtkmm2ext::HSV(c).mod (UIConfiguration::instance().modifier ("transparent region base")).color ();
}
}

6187556498 Opaque regions are supposed to be opaque
gtk2_ardour/audio_region_view.cc | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

  • Share