|
From: Tapio V. <aa...@us...> - 2011-01-25 14:55:08
|
Module: editor
Branch: master
Commit: 8f79c54920409fba4df0cba10e608ce036652852
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 25 16:50:45 2011 +0200
Visualize line breaks.
---
notelabel.cc | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/notelabel.cc b/notelabel.cc
index d1503d2..f2ada34 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -65,16 +65,15 @@ void NoteLabel::createPixmap(QSize size)
painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(m_selected ? Qt::red : Qt::black); // Hilight selected note
painter.setBrush(gradient);
- painter.drawRoundedRect(QRectF(0.5, 0.5, image.width()-1, image.height()-1),
- 8, 8);
+ painter.drawRoundedRect(QRectF(0.5, 0.5, image.width()-1, image.height()-1), 8, 8);
painter.setFont(font);
- painter.setBrush(Qt::black);
painter.drawText(QRect(QPoint(text_margin, text_margin), QSize(size.width()-text_margin, size.height()-text_margin)), Qt::AlignCenter, lyric());
// Render sentence end indicator
if (m_note.lineBreak) {
- // TODO
+ painter.setPen(QPen(QBrush(QColor(255, 0, 0)), 4));
+ painter.drawLine(image.width()-2, 0, image.width()-2, image.height()-1);
}
painter.end();
|