diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-05 15:50:13 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-05 15:50:13 +0100 |
commit | df32d30819587612761468a5562ca782b01045cf (patch) | |
tree | ad37e81bf5f83638a48f9a07d5c3b29e4d427585 /gtk2_ardour | |
parent | 30d7f03b5a34c68eab0613a4b8f65da860c37fd5 (diff) |
more processor-routing tweaks: compact view
* hide 'input' ports if mapping matches
-> display half circles
* show ports for top-most processor (allos insertion point)
* reduce line-size to 1.0 and routing-box height to 7 (cairo .5 px align)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 40 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 3 |
2 files changed, 31 insertions, 12 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 300449bceb..a820c82b07 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -127,9 +127,11 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo _button.show (); #ifdef ALWAYS_DISPLAY_WIRES - _routing_icon.show(); + _routing_icon.set_visible(true); +#else + _routing_icon.set_visible(false); #endif - _input_icon.show(); + _input_icon.hide(); _output_icon.show(); _processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context()); @@ -193,9 +195,17 @@ ProcessorEntry::drag_text () const } void -ProcessorEntry::set_position (Position p) +ProcessorEntry::set_position (Position p, uint32_t num) { _position = p; + _position_num = num; + + if (_position_num == 0 || _routing_icon.get_visible()) { + _input_icon.show(); + } else { + _input_icon.hide(); + } + setup_visuals (); } @@ -653,7 +663,10 @@ BlankProcessorEntry::BlankProcessorEntry (ProcessorBox* b, Width w, ChanCount cc _routing_icon.set_size_request (-1, 8); _vbox.set_size_request (-1, 8); #else - _vbox.set_size_request (-1, 0); + _vbox.pack_start (_input_icon); + _input_icon.set_ports(cc); + _input_icon.show(); + _vbox.set_size_request (-1, 4); #endif } @@ -720,13 +733,17 @@ PluginInsertProcessorEntry::plugin_insert_splitting_changed () _plugin_insert->input_streams().n_audio() < _plugin_insert->natural_input_streams().n_audio() ) { - _routing_icon.set_size_request (-1, 8); - _routing_icon.show(); + _routing_icon.set_size_request (-1, 7); + _routing_icon.set_visible(true); + _input_icon.show(); } else { #ifdef ALWAYS_DISPLAY_WIRES _routing_icon.set_size_request (-1, 4); #else - _routing_icon.hide(); + _routing_icon.set_visible(false); + if (_position_num != 0) { + _input_icon.hide(); + } #endif } @@ -813,7 +830,7 @@ ProcessorEntry::RoutingIcon::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, 1.5); + cairo_set_line_width (cr, 1.0); cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); Gtk::Allocation a = get_allocation(); @@ -1783,15 +1800,16 @@ ProcessorBox::setup_entry_positions () list<ProcessorEntry*> children = processor_display.children (); bool pre_fader = true; + uint32_t num = 0; for (list<ProcessorEntry*>::iterator i = children.begin(); i != children.end(); ++i) { if (boost::dynamic_pointer_cast<Amp>((*i)->processor())) { pre_fader = false; - (*i)->set_position (ProcessorEntry::Fader); + (*i)->set_position (ProcessorEntry::Fader, num++); } else { if (pre_fader) { - (*i)->set_position (ProcessorEntry::PreFader); + (*i)->set_position (ProcessorEntry::PreFader, num++); } else { - (*i)->set_position (ProcessorEntry::PostFader); + (*i)->set_position (ProcessorEntry::PostFader, num++); } } } diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index f0ff6bf34e..182013a383 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -125,7 +125,7 @@ public: PostFader }; - void set_position (Position); + void set_position (Position, uint32_t); boost::shared_ptr<ARDOUR::Processor> processor () const; void set_enum_width (Width); @@ -143,6 +143,7 @@ protected: ArdourButton _button; Gtk::VBox _vbox; Position _position; + uint32_t _position_num; virtual void setup_visuals (); |