diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2014-03-15 17:34:36 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2014-03-15 18:00:22 +0100 |
commit | 0ab8e89d5b4ef978b039fffbf95650292a85841f (patch) | |
tree | bb7c24b9cabb47ac6fc6591f3e40276b4a9862a9 /grc/gui/Block.py | |
parent | bd857db80dab56523ecbc76886cd6fa5c1183890 (diff) |
grc: special colors for missing blocks
Diffstat (limited to 'grc/gui/Block.py')
-rw-r--r-- | grc/gui/Block.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grc/gui/Block.py b/grc/gui/Block.py index c35ce1c505..b2b391246e 100644 --- a/grc/gui/Block.py +++ b/grc/gui/Block.py @@ -131,7 +131,8 @@ class Block(Element): def create_labels(self): """Create the labels for the signal block.""" Element.create_labels(self) - self._bg_color = self.get_enabled() and Colors.BLOCK_ENABLED_COLOR or Colors.BLOCK_DISABLED_COLOR + self._bg_color = self.is_dummy_block() and Colors.MISSING_BLOCK_BACKGROUND_COLOR or \ + self.get_enabled() and Colors.BLOCK_ENABLED_COLOR or Colors.BLOCK_DISABLED_COLOR layouts = list() #create the main layout layout = gtk.DrawingArea().create_pango_layout('') @@ -194,7 +195,8 @@ class Block(Element): #draw main block Element.draw( self, gc, window, bg_color=self._bg_color, - border_color=self.is_highlighted() and Colors.HIGHLIGHT_COLOR or Colors.BORDER_COLOR, + border_color=self.is_highlighted() and Colors.HIGHLIGHT_COLOR or + self.is_dummy_block() and Colors.MISSING_BLOCK_BORDER_COLOR or Colors.BORDER_COLOR, ) #draw label image if self.is_horizontal(): |