summaryrefslogtreecommitdiffstats
path: root/src/gui/Configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Configuration.cpp')
-rw-r--r--src/gui/Configuration.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index f6b0ee0e..6a6c2914 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -24,6 +24,7 @@
#include "client/PortModel.hpp"
#include "client/PluginModel.hpp"
#include "serialisation/Parser.hpp"
+#include "shared/LV2URIMap.hpp"
#include "flowcanvas/Port.hpp"
#include "App.hpp"
#include "Port.hpp"
@@ -40,11 +41,11 @@ using namespace Ingen::Client;
Configuration::Configuration()
// Colours from the Tango palette with modified V and alpha
: _name_style(HUMAN)
- , _audio_port_color( 0x244678C0)
- , _control_port_color(0x4A8A0EC0)
- , _event_port_color( 0x960909C0)
-// , _osc_port_color( 0x5C3566C0)
- , _value_port_color( 0x4A4A4AC0)
+ , _audio_port_color( 0x244678C0) // Blue
+ , _control_port_color(0x4A8A0EC0) // Green
+ , _event_port_color( 0x960909C0) // Red
+ , _string_port_color( 0x5C3566C0) // Plum
+ , _value_port_color( 0xBABDB6C0) // Aluminum
{
}
@@ -88,9 +89,11 @@ uint32_t
Configuration::get_port_color(const PortModel* p)
{
assert(p != NULL);
-
+ const Shared::LV2URIMap& uris = App::instance().uris();
if (p->is_a(Shared::PortType::AUDIO)) {
return _audio_port_color;
+ } else if (p->supports(uris.object_class_string)) {
+ return _string_port_color;
} else if (App::instance().can_control(p)) {
return _control_port_color;
} else if (p->is_a(Shared::PortType::EVENTS) || p->is_a(Shared::PortType::MESSAGE)) {