diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2014-12-02 22:48:56 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2014-12-02 22:48:56 +0100 |
commit | c4a7d780fc50a1556e2aaf02ec92ef91afbd3242 (patch) | |
tree | be0a7b66c7f43842295d19d1a92a01e661af986b /grc/gui/Port.py | |
parent | 30ff5da2bf36ebb98852f6be9c098447022818cd (diff) |
grc: draw ports with custom domain differently
Diffstat (limited to 'grc/gui/Port.py')
-rw-r--r-- | grc/gui/Port.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/grc/gui/Port.py b/grc/gui/Port.py index 2a87573911..5f8a733948 100644 --- a/grc/gui/Port.py +++ b/grc/gui/Port.py @@ -22,6 +22,7 @@ from Constants import \ PORT_SEPARATION, CONNECTOR_EXTENSION_MINIMAL, \ CONNECTOR_EXTENSION_INCREMENT, \ PORT_LABEL_PADDING, PORT_MIN_WIDTH, PORT_LABEL_HIDDEN_WIDTH, PORT_FONT +from .. base.Constants import DEFAULT_DOMAIN import Utils import Actions import Colors @@ -137,12 +138,15 @@ class Port(Element): gc: the graphics context window: the gtk window to draw on """ + normal_line_width = gc.line_width # todo: move line properties to Element + if self.get_domain() != DEFAULT_DOMAIN: gc.line_width = 2 Element.draw( self, gc, window, bg_color=self._bg_color, border_color=self.is_highlighted() and Colors.HIGHLIGHT_COLOR or self.get_parent().is_dummy_block() and Colors.MISSING_BLOCK_BORDER_COLOR or Colors.BORDER_COLOR, ) + gc.line_width = normal_line_width # restore line style if not self._areas_list or self._label_hidden(): return # this port is either hidden (no areas) or folded (no label) X, Y = self.get_coordinate() |