summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--ganv/Edge.hpp21
-rw-r--r--src/edge.c13
-rw-r--r--wscript2
4 files changed, 23 insertions, 18 deletions
diff --git a/NEWS b/NEWS
index 159e51b..52f76a2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
-ganv (1.5.0) unstable;
+ganv (1.5.1) unstable;
* Fix positioning of embedded widgets when changing layout.
* Fix unexpected node jumping when dragging new connections.
* Preserve selection for quickly making several connections.
+ * Distinguish edge color from port color slighly.
* Add support for PDF and PS export.
* Improve text rendering at high zoom.
* Fix various minor visual alignment/sizing issues.
@@ -10,7 +11,7 @@ ganv (1.5.0) unstable;
* Fix compilation with --no-fdgl (patch from Vlad Glagolev).
* Fix crash when destroying canvas.
- -- David Robillard <d@drobilla.net> Sun, 15 Feb 2015 21:59:18 -0500
+ -- David Robillard <d@drobilla.net> Sun, 15 Feb 2015 22:32:37 -0500
ganv (1.4.2) stable;
diff --git a/ganv/Edge.hpp b/ganv/Edge.hpp
index 350a617..443d569 100644
--- a/ganv/Edge.hpp
+++ b/ganv/Edge.hpp
@@ -41,20 +41,17 @@ public:
Edge(Canvas& canvas,
Node* tail,
Node* head,
- uint32_t color,
+ uint32_t color = 0,
bool show_arrowhead = false,
bool curved = true)
- : Item(GANV_ITEM(
- ganv_edge_new(
- canvas.gobj(),
- tail->gobj(),
- head->gobj(),
- "color", color,
- "curved", (gboolean)curved,
- "arrowhead", (gboolean)show_arrowhead,
- NULL)))
- {
- }
+ : Item(GANV_ITEM(ganv_edge_new(canvas.gobj(),
+ tail->gobj(),
+ head->gobj(),
+ "color", color,
+ "curved", (gboolean)curved,
+ "arrowhead", (gboolean)show_arrowhead,
+ NULL)))
+ {}
Edge(GanvEdge* gobj)
: Item(GANV_ITEM(gobj))
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);
}
diff --git a/wscript b/wscript
index d1c0686..3c78a9e 100644
--- a/wscript
+++ b/wscript
@@ -8,7 +8,7 @@ import waflib.extras.autowaf as autowaf
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-GANV_VERSION = '1.5.0'
+GANV_VERSION = '1.5.1'
GANV_MAJOR_VERSION = '1'
# Mandatory waf variables