[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/16: grc: pad comment boxes like blocks
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/16: grc: pad comment boxes like blocks |
Date: |
Sat, 3 Oct 2015 19:14:11 +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 e7b408195e7ee58c3983e64d44b844f8332a05cd
Author: Sebastian Koslowski <address@hidden>
Date: Fri Sep 25 13:48:50 2015 +0200
grc: pad comment boxes like blocks
---
grc/gui/Block.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index 94ed580..7350e4b 100644
--- a/grc/gui/Block.py
+++ b/grc/gui/Block.py
@@ -241,14 +241,17 @@ class Block(Element):
complexity=complexity,
font=BLOCK_FONT))
- # Setup the pixel map. Make sure that layout is valid
+ # Setup the pixel map. Make sure that layout not empty
width, height = layout.get_pixel_size()
- if layout and width > 0 and height > 0:
- pixmap = self.get_parent().new_pixmap(width, height)
+ if width and height:
+ padding = BLOCK_LABEL_PADDING
+ pixmap = self.get_parent().new_pixmap(width + 2 * padding,
+ height + 2 * padding)
gc = pixmap.new_gc()
gc.set_foreground(Colors.COMMENT_BACKGROUND_COLOR)
- pixmap.draw_rectangle(gc, True, 0, 0, width, height)
- pixmap.draw_layout(gc, 0, 0, layout)
+ pixmap.draw_rectangle(
+ gc, True, 0, 0, width + 2 * padding, height + 2 * padding)
+ pixmap.draw_layout(gc, padding, padding, layout)
self._comment_pixmap = pixmap
else:
self._comment_pixmap = None
- [Commit-gnuradio] [gnuradio] branch master updated (222e000 -> 0f9b29a), git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 04/16: gr-dtv: check for SSE2 support, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 14/16: Merge remote-tracking branch 'mbr0wn/uhd/multi_uhd_fft', git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 12/16: Merge branch 'maint', git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 07/16: grc: per-flowgraph custom run commands, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 03/16: uhd: uhd_fft now uses UHDApp, some bugfixes, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 10/16: grc: simple dialog for selecting QSS theme for QT GUI apps, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 16/16: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 11/16: grc: added param to set per-flow-graph QT-theme file, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 01/16: grc: Flowgraph complexity. Shows under options block when enabled., git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 02/16: grc: pad comment boxes like blocks,
git <=
- [Commit-gnuradio] [gnuradio] 06/16: grc: add File->New submenu with generate modes preset, Bar.py refactoring, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 08/16: grc: move generated start-up code into main(), whitespace fixes in generated code, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 13/16: Merge branch 'maint', git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 09/16: grc: flowgraph template: split arg parser from main(), git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 05/16: grc: fixup Actions*.py, git, 2015/10/08
- [Commit-gnuradio] [gnuradio] 15/16: Merge remote-tracking branch 'pinkavaj/no-x86-dtv-fix-00', git, 2015/10/08