summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_box.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-01-09 19:18:19 +0100
committerRobin Gareus <robin@gareus.org>2014-01-09 19:18:19 +0100
commit62d5b617d3e0883ad32afb163c47c2bba22e0996 (patch)
tree2803b13525de94703ca6feec44b160039c00f600 /gtk2_ardour/processor_box.cc
parentd343ffbde53ba2a6f39683465b3680e78e587992 (diff)
processor routing: use small boxes (instead of circles) for ports
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r--gtk2_ardour/processor_box.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index daab501daa..106a301140 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -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);