[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 12/24: grc: special colors for missing bloc
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 12/24: grc: special colors for missing blocks |
Date: |
Tue, 18 Mar 2014 17:51:41 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 0ab8e89d5b4ef978b039fffbf95650292a85841f
Author: Sebastian Koslowski <address@hidden>
Date: Sat Mar 15 17:34:36 2014 +0100
grc: special colors for missing blocks
---
grc/gui/Block.py | 6 ++++--
grc/gui/Colors.py | 3 +++
grc/gui/Port.py | 3 ++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index c35ce1c..b2b3912 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():
diff --git a/grc/gui/Colors.py b/grc/gui/Colors.py
index 5f92bb0..541d8db 100644
--- a/grc/gui/Colors.py
+++ b/grc/gui/Colors.py
@@ -26,6 +26,9 @@ try:
HIGHLIGHT_COLOR = get_color('#00FFFF')
BORDER_COLOR = get_color('black')
+ # missing blocks stuff
+ MISSING_BLOCK_BACKGROUND_COLOR = get_color('#FFF2F2')
+ MISSING_BLOCK_BORDER_COLOR = get_color('red')
#param entry boxes
PARAM_ENTRY_TEXT_COLOR = get_color('black')
ENTRYENUM_CUSTOM_COLOR = get_color('#EEEEEE')
diff --git a/grc/gui/Port.py b/grc/gui/Port.py
index fe1dc50..e542797 100644
--- a/grc/gui/Port.py
+++ b/grc/gui/Port.py
@@ -126,7 +126,8 @@ class Port(Element):
"""
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.get_parent().is_dummy_block() and
Colors.MISSING_BLOCK_BORDER_COLOR or Colors.BORDER_COLOR,
)
X,Y = self.get_coordinate()
(x,y),(w,h) = self._areas_list[0] #use the first area's sizes to place
the labels
- [Commit-gnuradio] [gnuradio] 07/24: gr-qtgui: Use dummy void* return value for pywidget if !ENABLE_PYTHON, (continued)
- [Commit-gnuradio] [gnuradio] 07/24: gr-qtgui: Use dummy void* return value for pywidget if !ENABLE_PYTHON, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 11/24: grc: show dummy blocks when opening grc blocks, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 15/24: grc: tabbed probs: fix initial error box height, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 14/24: grc: tabbed props: no more double entries, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 06/24: qtgui: Adding a Number sink with options to set autoscale, layout style, colors, averaging., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 04/24: Simplify some more., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 03/24: Move correlate_access_code_tag_bb to non-deprecated GRC category and deprecate the older correlate_access_code_bb., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 20/24: Merge remote-tracking branch 'skoslowski/grc_show_missing_blocks', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 09/24: grc: tabbed PropsDialog, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 19/24: Merge remote-tracking branch 'gnuradio-wg-grc/grc_pygtk_backw_compat_fixes', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 12/24: grc: special colors for missing blocks,
git <=
- [Commit-gnuradio] [gnuradio] 18/24: qtgui: fixes number sink to handle Python/C++ exposure (see: 6a78af5919133 and d9dbb6b489deb), git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 22/24: qtgui: fixing up a few minor details; include file and ability to set accumulate checkable on startup., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 10/24: Merge branch 'qtgui_numsink', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 02/24: Simplify correlate_access_code_tag_bb and fix bug leading to false trigger., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 23/24: Merge remote-tracking branch 'mbant/doxygen-updates', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 16/24: qtgui: fixed number display for qwt 5.2, 6.0, and 6.1., git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 08/24: gr-qtgui: Expose the qwidget() method in the public interface, git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 21/24: Merge remote-tracking branch 'bistromath/corr_tag', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 24/24: Merge branch 'maint', git, 2014/03/18
- [Commit-gnuradio] [gnuradio] 01/24: docs: Updated Doxy files, added search bar, git, 2014/03/18