summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Richardson <glenn.richardson@live.com>2016-05-18 15:03:30 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-05-18 15:03:30 +0200
commit3d3c796b27a67ad33b46453a9618490d4c206e0e (patch)
tree7a1c5a0b5d0edc393533843c5acdc29759bc1379
parent681846ff4f16388482ed7c6fb2a53e31e553e6a2 (diff)
grc: show comments next to rotated blocks (instead of underneath)
-rw-r--r--grc/gui/Block.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index 815982c318..a0a5f26fd4 100644
--- a/grc/gui/Block.py
+++ b/grc/gui/Block.py
@@ -345,6 +345,10 @@ class Block(Element, _Block):
if not self._comment_pixmap:
return
x, y = self.get_coordinate()
- y += self.H if self.is_horizontal() else self.W
- window.draw_drawable(gc, self._comment_pixmap, 0, 0, x,
- y + BLOCK_LABEL_PADDING, -1, -1)
+
+ if self.is_horizontal():
+ y += self.H + BLOCK_LABEL_PADDING
+ else:
+ x += self.H + BLOCK_LABEL_PADDING
+
+ window.draw_drawable(gc, self._comment_pixmap, 0, 0, x, y, -1, -1)