13
0

rename Editor::_canvas_bottom_rect as Editor::_canvas_drop_zone; increase its size; remove debug message

This commit is contained in:
Paul Davis 2014-06-09 09:09:21 -04:00
parent 0c5dae881c
commit b530e8649e
3 changed files with 11 additions and 10 deletions

View 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,

View 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.

View 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;
}