diff options
author | Josh Blum | 2011-10-19 21:47:09 -0700 |
---|---|---|
committer | Josh Blum | 2011-10-19 21:47:09 -0700 |
commit | d9545ca52708f66b5762e0ae597002beadd34631 (patch) | |
tree | 92f59f937abc2156541b13058ba37224ecc4ea28 | |
parent | 77a2d01cd2fce5a4e401a217c93fa13b76839162 (diff) | |
parent | 8be1f3f82e0f17583cecab9c8a4763dda4ebc1e7 (diff) | |
download | gnuradio-d9545ca52708f66b5762e0ae597002beadd34631.tar.gz gnuradio-d9545ca52708f66b5762e0ae597002beadd34631.tar.bz2 gnuradio-d9545ca52708f66b5762e0ae597002beadd34631.zip |
Merge branch 'master' into next
-rw-r--r-- | grc/python/Constants.py | 12 | ||||
-rw-r--r-- | grc/python/Port.py | 10 |
2 files changed, 13 insertions, 9 deletions
diff --git a/grc/python/Constants.py b/grc/python/Constants.py index 4a234f080..ab547ea27 100644 --- a/grc/python/Constants.py +++ b/grc/python/Constants.py @@ -46,13 +46,15 @@ BLOCK_DTD = os.path.join(DATA_DIR, 'block.dtd') DEFAULT_FLOW_GRAPH = os.path.join(DATA_DIR, 'default_flow_graph.grc') CORE_TYPES = ( #name, key, sizeof, color - ('Complex Float 64', 'fc64', 16, '#72f313'), + ('Complex Float 64', 'fc64', 16, '#CC8C69'), ('Complex Float 32', 'fc32', 8, '#3399FF'), - ('Complex Integer 32', 'sc32', 8, '#00b789'), - ('Complex Integer 16', 'sc16', 4, '#f37913'), - ('Complex Integer 8', 'sc8', 2, '#ff0e7f'), - ('Float 64', 'f64', 8, '#86a8fa'), + ('Complex Integer 64', 'sc64', 16, '#66CC00'), + ('Complex Integer 32', 'sc32', 8, '#33cc66'), + ('Complex Integer 16', 'sc16', 4, '#cccc00'), + ('Complex Integer 8', 'sc8', 2, '#cc00cc'), + ('Float 64', 'f64', 8, '#66CCCC'), ('Float 32', 'f32', 4, '#FF8C69'), + ('Integer 64', 's64', 8, '#99FF33'), ('Integer 32', 's32', 4, '#00FF99'), ('Integer 16', 's16', 2, '#FFFF66'), ('Integer 8', 's8', 1, '#FF66FF'), diff --git a/grc/python/Port.py b/grc/python/Port.py index 9baa81110..c2bfd9ccc 100644 --- a/grc/python/Port.py +++ b/grc/python/Port.py @@ -147,14 +147,16 @@ class Port(_Port, _GUIPort): """ try: color = Constants.TYPE_TO_COLOR[self.get_type()] - if self.get_vlen() == 1: return color + vlen = self.get_vlen() + if vlen == 1: return color color_val = int(color[1:], 16) r = (color_val >> 16) & 0xff g = (color_val >> 8) & 0xff b = (color_val >> 0) & 0xff - r = max(r-50, 0) - g = max(g-50, 0) - b = max(b-50, 0) + dark = (0, 0, 30, 50, 70)[min(4, vlen)] + r = max(r-dark, 0) + g = max(g-dark, 0) + b = max(b-dark, 0) return '#%.2x%.2x%.2x'%(r, g, b) except: return _Port.get_color(self) |