summaryrefslogtreecommitdiff
path: root/grc/gui
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2014-12-18 22:21:43 +0100
committerSebastian Koslowski <koslowski@kit.edu>2014-12-18 22:24:45 +0100
commit7bebb64fc4d58ee25c7f84d378aad4bd9065536c (patch)
treeb1f5aafb908b95bbc08495498d4d4b22f62c3b77 /grc/gui
parent20c71cb44a6f7500e64a8e9e394e9e1b372aa46d (diff)
grc: fix connections error log and color
Diffstat (limited to 'grc/gui')
-rw-r--r--grc/gui/Colors.py6
-rw-r--r--grc/gui/Connection.py9
2 files changed, 8 insertions, 7 deletions
diff --git a/grc/gui/Colors.py b/grc/gui/Colors.py
index fcde5c5974..7430705cf8 100644
--- a/grc/gui/Colors.py
+++ b/grc/gui/Colors.py
@@ -39,9 +39,9 @@ try:
BLOCK_DISABLED_COLOR = get_color('#CCCCCC')
#connection color constants
CONNECTION_ENABLED_COLOR = get_color('black')
- CONNECTION_DISABLED_COLOR = get_color('#999999')
+ CONNECTION_DISABLED_COLOR = get_color('#BBBBBB')
CONNECTION_ERROR_COLOR = get_color('red')
-
- DEFAULT_DOMAIN_COLOR = get_color('#666666')
except:
print 'Unable to import Colors'
+
+DEFAULT_DOMAIN_COLOR_CODE = '#777777'
diff --git a/grc/gui/Connection.py b/grc/gui/Connection.py
index 9655c0e38d..84004f5af6 100644
--- a/grc/gui/Connection.py
+++ b/grc/gui/Connection.py
@@ -87,9 +87,11 @@ class Connection(Element):
self.line_attributes[1] = gtk.gdk.LINE_ON_OFF_DASH
else:
self.line_attributes[1] = gtk.gdk.LINE_DOUBLE_DASH
- get_domain_color = lambda d: (
+ if source_domain != sink_domain:
+ self.line_attributes[0] = 2
+ get_domain_color = lambda d: Colors.get_color((
self.get_parent().get_parent().get_domain(d) or {}
- ).get('color') or Colors.DEFAULT_DOMAIN_COLOR
+ ).get('color') or Colors.DEFAULT_DOMAIN_COLOR_CODE)
self._color = get_domain_color(source_domain)
self._bg_color = get_domain_color(sink_domain)
@@ -172,9 +174,8 @@ class Connection(Element):
Colors.CONNECTION_DISABLED_COLOR if not self.get_enabled() else
self._bg_color
)
- # make message connections dashed (no areas here)
Element.draw(self, gc, window, border_color, bg_color)
- #draw arrow on sink port
+ # draw arrow on sink port
try:
gc.set_foreground(bg_color)
gc.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_BUTT, gtk.gdk.JOIN_MITER)