Made TrackPadding insert between tracks, rather than shortening tracks

This commit is contained in:
Joel Holdsworth 2008-11-22 12:33:58 +00:00
parent f0ab871cb3
commit 34e67cd01e
3 changed files with 5 additions and 6 deletions

View file

@ -331,7 +331,7 @@ TimelineWidget::measure_branch_height(Track* track)
{
REQUIRE(track != NULL);
int height = track->get_height();
int height = track->get_height() + TrackPadding;
// Recurse through all the children
BOOST_FOREACH( Track* child, track->get_child_tracks() )

View file

@ -304,8 +304,7 @@ TimelineBody::draw_track_recursive(Cairo::RefPtr<Cairo::Context> cr,
ASSERT(height >= 0);
// Draw the track background
cr->rectangle(0, 0, view_width,
height - TimelineWidget::TrackPadding);
cr->rectangle(0, 0, view_width, height);
GdkColor colour = backgroundColour; // Needed to preserve const qualifier
gdk_cairo_set_source_color(cr->cobj(), &colour);
cr->fill();
@ -316,7 +315,7 @@ TimelineBody::draw_track_recursive(Cairo::RefPtr<Cairo::Context> cr,
cr->restore();
// Shift for the next track
cr->translate(0, height);
cr->translate(0, height + TimelineWidget::TrackPadding);
// Recurse drawing into children
BOOST_FOREACH( Track* child, track->get_child_tracks() )

View file

@ -310,7 +310,7 @@ TimelineHeaderContainer::layout_headers_recursive(Track *track,
indent, // x
offset, // y
max( header_width - indent, 0 ), // width
track_height - TimelineWidget::TrackPadding); // height
track_height); // height
ASSERT(header_box.get_height() >= 0);
// Cache the bounding box
@ -330,7 +330,7 @@ TimelineHeaderContainer::layout_headers_recursive(Track *track,
widget.show();
// Offset for the next header
offset += track_height;
offset += track_height + TimelineWidget::TrackPadding;
}
else
if(widget.is_visible())