rename Editor::_canvas_bottom_rect as Editor::_canvas_drop_zone; increase its size...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 9 Jun 2014 13:09:21 +0000 (09:09 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 9 Jun 2014 13:09:21 +0000 (09:09 -0400)
gtk2_ardour/editor.h
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_canvas_events.cc

index eb79b35d2385746c71df347efa24201f64205928..b664ac0b84a3b3e8e172cc92e43b163a303742ac 100644 (file)
@@ -752,8 +752,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
         /* a rect that sits at the bottom of all tracks to act as a drag-no-drop/clickable
         * target area.
         */
-        ArdourCanvas::Rectangle* _canvas_bottom_rect;
-        bool canvas_bottom_rect_event (GdkEvent* event);
+        ArdourCanvas::Rectangle* _canvas_drop_zone;
+        bool canvas_drop_zone_event (GdkEvent* event);
 
        enum RulerType {
                ruler_metric_timecode = 0,
index 9371fbbd46f9734fc53b440e6bcc28136acb4c05..58940837ef436b5d093a202585f39d93cbe49c82 100644 (file)
@@ -226,11 +226,11 @@ Editor::initialize_canvas ()
        }
 
 
-       _canvas_bottom_rect = new ArdourCanvas::Rectangle (hv_scroll_group, ArdourCanvas::Rect (0.0, 0.0, ArdourCanvas::COORD_MAX, 20));
+       _canvas_drop_zone = new ArdourCanvas::Rectangle (hv_scroll_group, ArdourCanvas::Rect (0.0, 0.0, ArdourCanvas::COORD_MAX, 0.0));
        /* this thing is transparent */
-       _canvas_bottom_rect->set_fill (false);
-       _canvas_bottom_rect->set_outline (false);
-       _canvas_bottom_rect->Event.connect (sigc::mem_fun (*this, &Editor::canvas_bottom_rect_event));
+       _canvas_drop_zone->set_fill (false);
+       _canvas_drop_zone->set_outline (false);
+       _canvas_drop_zone->Event.connect (sigc::mem_fun (*this, &Editor::canvas_drop_zone_event));
 
        /* these signals will initially be delivered to the canvas itself, but if they end up remaining unhandled, they are passed to Editor-level
           handlers.
@@ -286,6 +286,8 @@ Editor::track_canvas_viewport_size_allocated ()
        _visible_canvas_width  = _canvas_viewport_allocation.get_width ();
        _visible_canvas_height = _canvas_viewport_allocation.get_height ();
 
+       _canvas_drop_zone->set_y1 (_canvas_drop_zone->y0() + _visible_canvas_height);
+
        // SHOWTRACKS
 
        if (height_changed) {
@@ -340,13 +342,13 @@ Editor::reset_controls_layout_height (int32_t h)
         * (the drag-n-drop zone) is, in fact, at the bottom.
         */
 
-       _canvas_bottom_rect->set_position (ArdourCanvas::Duple (0, h));
+       _canvas_drop_zone->set_position (ArdourCanvas::Duple (0, h));
 
        /* track controls layout must span the full height of "h" (all tracks)
         * plus the bottom rect.
         */
 
-       h += _canvas_bottom_rect->height ();
+       h += _canvas_drop_zone->height ();
 
         /* set the height of the scrollable area (i.e. the sum of all contained widgets)
         * for the controls layout. The size request is set elsewhere.
index 36d9ee98ea00211b52768416a95cb039dfb186f4..04609330ff9a6862c8f6de4639103e8b7a229646 100644 (file)
@@ -1010,9 +1010,8 @@ Editor::canvas_note_event (GdkEvent *event, ArdourCanvas::Item* item)
 }
 
 bool
-Editor::canvas_bottom_rect_event (GdkEvent* event)
+Editor::canvas_drop_zone_event (GdkEvent* event)
 {
-       cerr << "CBR event, type " << event << endl;
        return true;
 }