[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/22: grc: draw ports with custom domain d
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/22: grc: draw ports with custom domain differently |
Date: |
Tue, 23 Dec 2014 09:38:56 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit c4a7d780fc50a1556e2aaf02ec92ef91afbd3242
Author: Sebastian Koslowski <address@hidden>
Date: Tue Dec 2 22:48:56 2014 +0100
grc: draw ports with custom domain differently
---
grc/gui/Block.py | 8 ++++----
grc/gui/Port.py | 4 ++++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index 9b8d3b1..11c1caf 100644
--- a/grc/gui/Block.py
+++ b/grc/gui/Block.py
@@ -212,8 +212,11 @@ class Block(Element):
gc: the graphics context
window: the gtk window to draw on
"""
+ # draw ports
+ for port in self.get_ports_gui():
+ port.draw(gc, window)
+ # draw main block
x, y = self.get_coordinate()
- #draw main block
Element.draw(
self, gc, window, bg_color=self._bg_color,
border_color=self.is_highlighted() and Colors.HIGHLIGHT_COLOR or
@@ -224,9 +227,6 @@ class Block(Element):
window.draw_drawable(gc, self.horizontal_label, 0, 0,
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
elif self.is_vertical():
window.draw_drawable(gc, self.vertical_label, 0, 0,
x+(self.H-self.label_height)/2, y+BLOCK_LABEL_PADDING, -1, -1)
- #draw ports
- for port in self.get_ports_gui():
- port.draw(gc, window)
def what_is_selected(self, coor, coor_m=None):
"""
diff --git a/grc/gui/Port.py b/grc/gui/Port.py
index 2a87573..5f8a733 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()
- [Commit-gnuradio] [gnuradio] 12/22: grc: port connections by domain, block name in generated code, (continued)
- [Commit-gnuradio] [gnuradio] 12/22: grc: port connections by domain, block name in generated code, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 10/22: grc: add multiple_sources flag to domain.dtd, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 13/22: runtime: whitespace fixes, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 15/22: runtime: add tests for new decorators in hier_block2, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 14/22: runtime: refactor top/hier block python wrappers, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 17/22: grc: fix connections error log and color, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 11/22: grc: PEP8 fixes in Generator, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 16/22: grc: add domain property color and use it for connections, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 06/22: grc: domain-specific port keys, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 09/22: grc: make Generator use gr_message domain, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 03/22: grc: draw ports with custom domain differently,
git <=
- [Commit-gnuradio] [gnuradio] 22/22: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 04/22: grc: don't fail for unknown domains, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 19/22: Merge branch 'port_domains' into master_grcwg, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 05/22: grc: use domain connection templates in Generator, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 21/22: Merge remote-tracking branch 'skoslowski/msg_connect_extended', git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 18/22: grc: port domain code clean-up, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 20/22: Merge branch 'maint', git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 02/22: grc: add domain attribute to ports, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 01/22: grc: add domain xml DTD and parsing, git, 2014/12/23