Draw mouseover lines only between the target and the labels.
git-svn-id: svn://localhost/ardour2/branches/3.0@4449 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
948034f15a
commit
2a341d9959
@ -74,6 +74,10 @@ public:
|
|||||||
PortMatrixNode mouseover () const {
|
PortMatrixNode mouseover () const {
|
||||||
return _mouseover;
|
return _mouseover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Arrangement arrangement () const {
|
||||||
|
return _arrangement;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool on_expose_event (GdkEventExpose *);
|
bool on_expose_event (GdkEventExpose *);
|
||||||
|
@ -252,25 +252,33 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
|
|||||||
set_source_rgba (cr, mouseover_line_colour(), 0.3);
|
set_source_rgba (cr, mouseover_line_colour(), 0.3);
|
||||||
cairo_set_line_width (cr, mouseover_line_width());
|
cairo_set_line_width (cr, mouseover_line_width());
|
||||||
|
|
||||||
|
double const x = component_to_parent_x (
|
||||||
|
channel_position (_body->mouseover().column, _body->column_ports().bundles(), column_width()) + column_width() / 2
|
||||||
|
);
|
||||||
|
|
||||||
|
double const y = component_to_parent_y (
|
||||||
|
channel_position (_body->mouseover().row, _body->row_ports().bundles(), row_height()) + row_height() / 2
|
||||||
|
);
|
||||||
|
|
||||||
if (_body->mouseover().row.bundle) {
|
if (_body->mouseover().row.bundle) {
|
||||||
|
|
||||||
double const y = component_to_parent_y (
|
cairo_move_to (cr, x, y);
|
||||||
channel_position (_body->mouseover().row, _body->row_ports().bundles(), row_height()) + row_height() / 2
|
if (_body->arrangement() == PortMatrixBody::BOTTOM_AND_LEFT) {
|
||||||
);
|
cairo_line_to (cr, component_to_parent_x (0), y);
|
||||||
|
} else if (_body->arrangement() == PortMatrixBody::TOP_AND_RIGHT) {
|
||||||
cairo_move_to (cr, _parent_rectangle.get_x(), y);
|
cairo_line_to (cr, _parent_rectangle.get_x() + _parent_rectangle.get_width(), y);
|
||||||
cairo_line_to (cr, _parent_rectangle.get_x() + _parent_rectangle.get_width(), y);
|
}
|
||||||
cairo_stroke (cr);
|
cairo_stroke (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_body->mouseover().column.bundle) {
|
if (_body->mouseover().column.bundle) {
|
||||||
|
|
||||||
double const x = component_to_parent_x (
|
cairo_move_to (cr, x, y);
|
||||||
channel_position (_body->mouseover().column, _body->column_ports().bundles(), column_width()) + column_width() / 2
|
if (_body->arrangement() == PortMatrixBody::BOTTOM_AND_LEFT) {
|
||||||
);
|
cairo_line_to (cr, x, _parent_rectangle.get_y() + _parent_rectangle.get_height());
|
||||||
|
} else if (_body->arrangement() == PortMatrixBody::TOP_AND_RIGHT) {
|
||||||
cairo_move_to (cr, x, _parent_rectangle.get_y());
|
cairo_line_to (cr, x, component_to_parent_y (0));
|
||||||
cairo_line_to (cr, x, _parent_rectangle.get_y() + _parent_rectangle.get_height());
|
}
|
||||||
cairo_stroke (cr);
|
cairo_stroke (cr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user