diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/Arc.cpp | 44 | ||||
-rw-r--r-- | src/gui/Arc.hpp | 7 | ||||
-rw-r--r-- | src/gui/Port.cpp | 1 | ||||
-rw-r--r-- | src/gui/Style.cpp | 2 | ||||
-rw-r--r-- | src/gui/wscript | 3 |
5 files changed, 50 insertions, 7 deletions
diff --git a/src/gui/Arc.cpp b/src/gui/Arc.cpp new file mode 100644 index 00000000..c14b2e88 --- /dev/null +++ b/src/gui/Arc.cpp @@ -0,0 +1,44 @@ +/* + This file is part of Ingen. + Copyright 2007-2015 David Robillard <http://drobilla.net/> + + Ingen is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or any later version. + + Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. + + You should have received a copy of the GNU Affero General Public License + along with Ingen. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "Arc.hpp" +#include "ingen/client/ArcModel.hpp" +#include "ingen/client/BlockModel.hpp" + +#define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#" + +namespace Ingen { +namespace GUI { + +Arc::Arc(Ganv::Canvas& canvas, + SPtr<const Client::ArcModel> model, + Ganv::Node* src, + Ganv::Node* dst) + : Ganv::Edge(canvas, src, dst) + , _arc_model(model) +{ + SPtr<const Client::ObjectModel> tparent = model->tail()->parent(); + SPtr<const Client::BlockModel> tparent_block; + if ((tparent_block = dynamic_ptr_cast<const Client::BlockModel>(tparent))) { + if (tparent_block->plugin_uri() == NS_INTERNALS "BlockDelay") { + g_object_set(_gobj, "dash-length", 4.0, NULL); + set_constraining(false); + } + } +} + +} // namespace GUI +} // namespace Ingen diff --git a/src/gui/Arc.hpp b/src/gui/Arc.hpp index e47600d2..382ca305 100644 --- a/src/gui/Arc.hpp +++ b/src/gui/Arc.hpp @@ -38,10 +38,7 @@ public: Arc(Ganv::Canvas& canvas, SPtr<const Client::ArcModel> model, Ganv::Node* src, - Ganv::Node* dst) - : Ganv::Edge(canvas, src, dst) - , _arc_model(model) - {} + Ganv::Node* dst); SPtr<const Client::ArcModel> model() const { return _arc_model; } @@ -52,4 +49,4 @@ private: } // namespace GUI } // namespace Ingen -#endif // INGEN_GUI_EDGE_HPP +#endif // INGEN_GUI_ARC_HPP diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index fd5e5a14..1a9750a6 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -525,6 +525,7 @@ Port::property_changed(const Raul::URI& key, const Atom& value) set_label(value.ptr<char>()); } } else if (key == uris.rdf_type || key == uris.atom_bufferType) { + set_fill_color(_app.style()->get_port_color(model().get())); Ganv::Port::set_beveled(model()->is_a(uris.lv2_ControlPort) || model()->has_property(uris.atom_bufferType, uris.atom_Sequence)); diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp index 598409bf..6813fc04 100644 --- a/src/gui/Style.cpp +++ b/src/gui/Style.cpp @@ -106,7 +106,7 @@ Style::get_port_color(const Client::PortModel* p) } _app.log().warn(fmt("No known port type for %1%\n") % p->path()); - return 0x666666FF; + return 0x555555FF; } } // namespace GUI diff --git a/src/gui/wscript b/src/gui/wscript index 1beba44b..0d7f7fc5 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -13,7 +13,7 @@ def configure(conf): autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='NEW_GTKMM', atleast_version='2.14.0', mandatory=False) autowaf.check_pkg(conf, 'ganv-1', uselib_store='GANV', - atleast_version='1.5.3', mandatory=False) + atleast_version='1.5.4', mandatory=False) if not Options.options.no_webkit: autowaf.check_pkg(conf, 'webkit-1.0', uselib_store='WEBKIT', atleast_version='1.4.0', mandatory=False) @@ -50,6 +50,7 @@ def build(bld): obj.source = ''' App.cpp + Arc.cpp BreadCrumbs.cpp ConnectWindow.cpp GraphBox.cpp |