highlight area below automation lanes
authorRobin Gareus <robin@gareus.org>
Mon, 4 Jul 2016 20:14:00 +0000 (22:14 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 4 Jul 2016 22:39:43 +0000 (00:39 +0200)
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_line.h
gtk2_ardour/automation_time_axis.cc

index 5d3f0782e87d720adbf03c7e479c5b80937a8297..eb53ebce178e6769d944b64d9fd0a59f7ceac25b 100644 (file)
@@ -86,6 +86,7 @@ AutomationLine::AutomationLine (const string&                              name,
        , _parent_group (parent)
        , _offset (0)
        , _maximum_time (max_framepos)
+       , _fill (false)
        , _desc (desc)
 {
        if (converter) {
@@ -229,6 +230,11 @@ AutomationLine::set_height (guint32 h)
                        (*i)->set_size (bsz);
                }
 
+               if (_fill) {
+                       line->set_fill_y1 (_height);
+               } else {
+                       line->set_fill_y1 (0);
+               }
                reset ();
        }
 }
@@ -238,6 +244,7 @@ AutomationLine::set_line_color (uint32_t color)
 {
        _line_color = color;
        line->set_outline_color (color);
+       line->set_fill_color ((color & 0xffff00) + 80); // XXX TODO configurable transparency
 }
 
 void
index 816cefedef9a6260b2e226179178c3fb0b90b878..d51e437bdd7fea04607c9524f9bed7775241860c 100644 (file)
@@ -73,6 +73,7 @@ public:
        void queue_reset ();
        void reset ();
        void clear ();
+       void set_fill (bool f) { _fill = f; } // owner needs to call set_height
 
        void set_selected_points (PointSelection const &);
        void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*>&);
@@ -236,6 +237,8 @@ private:
        /** maximum time that a point on this line can be at, relative to the position of its region or start of its track */
        ARDOUR::framecnt_t _maximum_time;
 
+       bool _fill;
+
        const ARDOUR::ParameterDescriptor _desc;
 
        friend class AudioRegionGainLine;
index 564443a7f3e9be81d13eb7f116d63ed9e9a3e938..3a1dbf3c0cf64d1eac8a33995816ec6bbae267be 100644 (file)
@@ -270,6 +270,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
                        );
 
                line->set_line_color (UIConfiguration::instance().color ("processor automation line"));
+               line->set_fill (true);
                line->queue_reset ();
                add_line (line);
        }