processor routing: use small boxes (instead of circles) for ports
This commit is contained in:
parent
d343ffbde5
commit
62d5b617d3
@ -706,9 +706,6 @@ ProcessorEntry::PortIcon::on_expose_event (GdkEventExpose* ev)
|
||||
cairo_rectangle (cr, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
|
||||
cairo_clip (cr);
|
||||
|
||||
cairo_set_line_width (cr, 5.0);
|
||||
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
|
||||
|
||||
Gtk::Allocation a = get_allocation();
|
||||
double const width = a.get_width();
|
||||
double const height = a.get_height();
|
||||
@ -719,8 +716,6 @@ ProcessorEntry::PortIcon::on_expose_event (GdkEventExpose* ev)
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_fill (cr);
|
||||
|
||||
const double y0 = _input ? height-.5 : .5;
|
||||
|
||||
if (_ports.n_total() > 1) {
|
||||
for (uint32_t i = 0; i < _ports.n_total(); ++i) {
|
||||
if (i < _ports.n_midi()) {
|
||||
@ -734,10 +729,9 @@ ProcessorEntry::PortIcon::on_expose_event (GdkEventExpose* ev)
|
||||
UINT_RGBA_G_FLT(audio_port_color),
|
||||
UINT_RGBA_B_FLT(audio_port_color));
|
||||
}
|
||||
const float x = rintf(width * (.2f + .6f * i / (_ports.n_total() - 1.f))) + .5f;
|
||||
cairo_move_to (cr, x, y0);
|
||||
cairo_close_path(cr);
|
||||
cairo_stroke(cr);
|
||||
const float x = rintf(width * (.2f + .6f * i / (_ports.n_total() - 1.f)));
|
||||
cairo_rectangle (cr, x-1, 0, 3, height);
|
||||
cairo_fill(cr);
|
||||
}
|
||||
} else if (_ports.n_total() == 1) {
|
||||
if (_ports.n_midi() == 1) {
|
||||
@ -751,8 +745,9 @@ ProcessorEntry::PortIcon::on_expose_event (GdkEventExpose* ev)
|
||||
UINT_RGBA_G_FLT(audio_port_color),
|
||||
UINT_RGBA_B_FLT(audio_port_color));
|
||||
}
|
||||
cairo_move_to (cr, rintf(width * .5) + .5f, y0);
|
||||
cairo_close_path(cr);
|
||||
const float x = rintf(width * .5);
|
||||
cairo_rectangle (cr, x-1, 0, 3, height);
|
||||
cairo_fill(cr);
|
||||
cairo_stroke(cr);
|
||||
}
|
||||
|
||||
@ -797,7 +792,7 @@ ProcessorEntry::RoutingIcon::on_expose_event (GdkEventExpose* ev)
|
||||
UINT_RGBA_B_FLT(midi_port_color));
|
||||
if (midi_sources > 0 && midi_sinks > 0 && sinks > 1 && sources > 1) {
|
||||
for (uint32_t i = 0 ; i < midi_sources; ++i) {
|
||||
const float si_x = rintf(width * (.2f + .6f * i / (sinks - 1.f))) + .5f;
|
||||
const float si_x = rintf(width * (.2f + .6f * i / (sinks - 1.f))) + .5f;
|
||||
const float si_x0 = rintf(width * (.2f + .6f * i / (sources - 1.f))) + .5f;
|
||||
cairo_move_to (cr, si_x, height);
|
||||
cairo_curve_to (cr, si_x, 0, si_x0, height, si_x0, 0);
|
||||
|
@ -211,7 +211,7 @@ private:
|
||||
PortIcon(bool input) {
|
||||
_input = input;
|
||||
_ports = ARDOUR::ChanCount(ARDOUR::DataType::AUDIO, 1);
|
||||
set_size_request (-1, 3);
|
||||
set_size_request (-1, 2);
|
||||
}
|
||||
void set_ports(ARDOUR::ChanCount const ports) { _ports = ports; }
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user