diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-15 22:08:03 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-15 22:08:03 +0200 |
commit | 6cd5d72962e4da9d359f582d20d482f239f284a3 (patch) | |
tree | 1f89e06e15e546144a26b6b4f8f1c5c5dd94c779 /gtk2_ardour/plugin_pin_dialog.cc | |
parent | b0311093119e6a8841ccc5d0036139db7f668e88 (diff) |
refine Pin dialog
* bend thru-wires away from center (distinguish from connections)
* show DnD wire on move only (not on click select
* consisten Label for Plugin Instance
Diffstat (limited to 'gtk2_ardour/plugin_pin_dialog.cc')
-rw-r--r-- | gtk2_ardour/plugin_pin_dialog.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk2_ardour/plugin_pin_dialog.cc b/gtk2_ardour/plugin_pin_dialog.cc index d089890574..d552b0368a 100644 --- a/gtk2_ardour/plugin_pin_dialog.cc +++ b/gtk2_ardour/plugin_pin_dialog.cc @@ -723,7 +723,8 @@ void PluginPinDialog::draw_connection (cairo_t* cr, double x0, double x1, double y0, double y1, bool midi, bool horiz, bool dashed) { const double bz = 2 * _pin_box_size; - const double bc = (dashed && x0 == x1) ? 1.25 * _pin_box_size : 0; + double bc = (dashed && x0 == x1) ? 1.25 * _pin_box_size : 0; + if (x0 > _width * .5) { bc *= -1; } cairo_move_to (cr, x0, y0); if (horiz) { @@ -872,7 +873,7 @@ PluginPinDialog::darea_expose_event (GdkEventExpose* ev) cairo_fill (cr); layout->set_width (1.9 * _bxw2 * PANGO_SCALE); - layout->set_text (string_compose (_("Plugin #%1"), i + 1)); + layout->set_text (string_compose (_("Instance #%1"), i + 1)); layout->get_pixel_size (text_width, text_height); cairo_move_to (cr, x0 - text_width * .5, yc - text_height * .5); cairo_set_source_rgba (cr, 1., 1., 1., 1.); @@ -1060,8 +1061,9 @@ PluginPinDialog::darea_button_press_event (GdkEventButton* ev) _actor.reset (); if (_selection) { start_drag (_selection, ev->x, ev->y); + } else { + darea.queue_draw (); } - darea.queue_draw (); } else if (_selection && _hover && _selection != _hover) { if (_selection->dt != _hover->dt) { _actor.reset (); } else if (_selection->ct == Input && _hover->ct == Sink) { _actor = _hover; } @@ -1073,8 +1075,9 @@ PluginPinDialog::darea_button_press_event (GdkEventButton* ev) if (!_actor) { _selection = _hover; start_drag (_selection, ev->x, ev->y); + } else { + darea.queue_draw (); } - darea.queue_draw (); } else if (_hover) { _selection = _hover; _actor.reset (); |