summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grc/gui/Block.py3
-rw-r--r--grc/gui/Colors.py1
-rw-r--r--grc/gui/FlowGraph.py7
3 files changed, 5 insertions, 6 deletions
diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index 5d3ae457da..60f19fc1a4 100644
--- a/grc/gui/Block.py
+++ b/grc/gui/Block.py
@@ -217,14 +217,13 @@ class Block(Element):
width, height = layout.get_pixel_size()
pixmap = self.get_parent().new_pixmap(width, height)
gc = pixmap.new_gc()
- gc.set_foreground(Colors.FLOWGRAPH_BACKGROUND_COLOR)
+ gc.set_foreground(Colors.COMMENT_BACKGROUND_COLOR)
pixmap.draw_rectangle(gc, True, 0, 0, width, height)
pixmap.draw_layout(gc, 0, 0, layout)
self._comment_pixmap = pixmap
else:
self._comment_pixmap = None
-
def draw(self, gc, window):
"""
Draw the signal block with label and inputs/outputs.
diff --git a/grc/gui/Colors.py b/grc/gui/Colors.py
index 7430705cf8..f64106b03f 100644
--- a/grc/gui/Colors.py
+++ b/grc/gui/Colors.py
@@ -34,6 +34,7 @@ try:
ENTRYENUM_CUSTOM_COLOR = get_color('#EEEEEE')
#flow graph color constants
FLOWGRAPH_BACKGROUND_COLOR = get_color('#FFF9FF')
+ COMMENT_BACKGROUND_COLOR = get_color('#F3F3F3')
#block color constants
BLOCK_ENABLED_COLOR = get_color('#F1ECFF')
BLOCK_DISABLED_COLOR = get_color('#CCCCCC')
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 51b522a2d5..97f814f1bf 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -281,12 +281,10 @@ class FlowGraph(Element):
gc.set_foreground(Colors.FLOWGRAPH_BACKGROUND_COLOR)
window.draw_rectangle(gc, True, 0, 0, W, H)
# draw comments first
- hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active()
if Actions.TOGGLE_SHOW_BLOCK_COMMENTS.get_active():
for block in self.get_blocks():
- if hide_disabled_blocks and not block.get_enabled():
- continue # skip hidden disabled block comments
- block.draw_comment(gc, window)
+ if block.get_enabled():
+ block.draw_comment(gc, window)
#draw multi select rectangle
if self.mouse_pressed and (not self.get_selected_elements() or self.get_ctrl_mask()):
#coordinates
@@ -301,6 +299,7 @@ class FlowGraph(Element):
gc.set_foreground(Colors.BORDER_COLOR)
window.draw_rectangle(gc, False, x, y, w, h)
#draw blocks on top of connections
+ hide_disabled_blocks = Actions.TOGGLE_HIDE_DISABLED_BLOCKS.get_active()
for element in self.get_connections() + self.get_blocks():
if hide_disabled_blocks and not element.get_enabled():
continue # skip hidden disabled blocks and connections