summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-09 09:09:21 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-09 09:09:21 -0400
commitb530e8649e8edcea7373275ebcb871042160d8e3 (patch)
tree06b6a469216ff47b914f2d4c0295d69876d264ab
parent0c5dae881c41dec399c7bfeb4c1c25b209122c5c (diff)
rename Editor::_canvas_bottom_rect as Editor::_canvas_drop_zone; increase its size; remove debug message
-rw-r--r--gtk2_ardour/editor.h4
-rw-r--r--gtk2_ardour/editor_canvas.cc14
-rw-r--r--gtk2_ardour/editor_canvas_events.cc3
3 files changed, 11 insertions, 10 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index eb79b35d23..b664ac0b84 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -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,
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 9371fbbd46..58940837ef 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -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.
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index 36d9ee98ea..04609330ff 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -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;
}