Fix minor visual glitch with mouseover when a label is partially out-of-sight.

git-svn-id: svn://localhost/ardour2/branches/3.0@4489 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-02-04 14:26:00 +00:00
parent b6daa2d643
commit dc6571fb29
2 changed files with 21 additions and 0 deletions

View File

@ -97,9 +97,22 @@ PortMatrixBody::on_expose_event (GdkEventExpose* event)
}
cairo_t* cr = gdk_cairo_create (get_window()->gobj());
cairo_save (cr);
set_cairo_clip (cr, _grid.parent_rectangle ());
_grid.draw_extra (cr);
cairo_restore (cr);
cairo_save (cr);
set_cairo_clip (cr, _row_labels.parent_rectangle ());
_row_labels.draw_extra (cr);
cairo_restore (cr);
cairo_save (cr);
set_cairo_clip (cr, _column_labels.parent_rectangle ());
_column_labels.draw_extra (cr);
cairo_restore (cr);
cairo_destroy (cr);
return true;
@ -458,3 +471,10 @@ PortMatrixBody::highlight_associated_channels (int dim, uint32_t N)
}
}
}
void
PortMatrixBody::set_cairo_clip (cairo_t* cr, Gdk::Rectangle const & r) const
{
cairo_rectangle (cr, r.get_x(), r.get_y(), r.get_width(), r.get_height());
cairo_clip (cr);
}

View File

@ -75,6 +75,7 @@ private:
void rebuild_and_draw_column_labels ();
void rebuild_and_draw_row_labels ();
void update_bundles ();
void set_cairo_clip (cairo_t *, Gdk::Rectangle const &) const;
PortMatrix* _matrix;
PortMatrixColumnLabels _column_labels;