Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2013-02-11 13:18:36 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2013-02-11 13:18:36 (GMT)
commit199e958182e243f4ca1b738c61921f1d9d1c38d7 (patch)
treec312dded0510e9e4f4cd69ae829bccacb95b4cf8
parent74ccca8586322fa0fd95fe171f6b9287eb60c85d (diff)
Draw staff imaginary line when selecting note C
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
-rw-r--r--__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/__init__.py b/__init__.py
index 2b7597f..071288b 100644
--- a/__init__.py
+++ b/__init__.py
@@ -62,7 +62,8 @@ class StaffArea(Gtk.DrawingArea):
noteincrement = linespacing / 2.0
rmargin = self.track.piano.staffx + linespacing * 2
lmargin = self.track.piano.staffx * 0.1
- return (rmargin + ((self.width - (rmargin + lmargin)) / 16) * note, ymax - noteincrement * (note + 6), noteincrement)
+ return (rmargin + ((self.width - (rmargin + lmargin)) / 16) * note,
+ ymax - noteincrement * (note + 6), noteincrement)
def select_note(self, note):
self.selected.append(note)
@@ -72,3 +73,8 @@ class StaffArea(Gtk.DrawingArea):
ctx.arc(x, y, radius, 0, 180)
ctx.fill()
ctx.stroke()
+ if note == 8:
+ ctx.set_line_width(3)
+ ctx.move_to(x - radius * 1.5, y)
+ ctx.line_to(x + radius * 1.5, y)
+ ctx.stroke()