summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-16 03:39:18 +0000
committerDavid Robillard <d@drobilla.net>2015-02-16 03:39:18 +0000
commit30d685b0856a73066bc7bd288dfa0923e8c73446 (patch)
tree352014260660b755e99a4ea88e075bfd58c49e56 /src
parent4d87d72cefa00f4ee107972880b95287e5463994 (diff)
downloadganv-30d685b0856a73066bc7bd288dfa0923e8c73446.tar.gz
ganv-30d685b0856a73066bc7bd288dfa0923e8c73446.tar.bz2
ganv-30d685b0856a73066bc7bd288dfa0923e8c73446.zip
Distinguish edge color from port color slighly.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5577 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/edge.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/edge.c b/src/edge.c
index 444de82..449f884 100644
--- a/src/edge.c
+++ b/src/edge.c
@@ -78,7 +78,7 @@ ganv_edge_init(GanvEdge* edge)
impl->old_coords = impl->coords;
impl->dash_length = 0.0;
impl->dash_offset = 0.0;
- impl->color = 0xA0A0A0FF;
+ impl->color = 0;
}
static void
@@ -334,7 +334,7 @@ ganv_edge_draw(GanvItem* item,
double r, g, b, a;
if (impl->highlighted) {
- color_to_rgba(highlight_color(impl->color, 0x20), &r, &g, &b, &a);
+ color_to_rgba(highlight_color(impl->color, 0x40), &r, &g, &b, &a);
} else {
color_to_rgba(impl->color, &r, &g, &b, &a);
}
@@ -553,7 +553,7 @@ ganv_edge_class_init(GanvEdgeClass* klass)
_("Color"),
_("Line color as an RGBA integer."),
0, G_MAXUINT,
- 0xA0A0A0FF,
+ 0,
G_PARAM_READWRITE));
g_object_class_install_property(
@@ -626,6 +626,13 @@ ganv_edge_new(GanvCanvas* canvas,
edge->impl->tail = tail;
edge->impl->head = head;
+ if (!edge->impl->color) {
+ const guint tail_color = GANV_NODE(tail)->impl->fill_color;
+ g_object_set(G_OBJECT(edge),
+ "color", highlight_color(tail_color, 48),
+ NULL);
+ }
+
if (!edge->impl->ghost) {
ganv_canvas_add_edge(canvas, edge);
}