From a3464a505c5554b621635dc8e2193bba2995bccb Mon Sep 17 00:00:00 2001 From: Nils Date: Fri, 29 Jul 2022 18:44:32 +0200 Subject: [PATCH] Barlines more visible --- qtgui/musicstructures.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qtgui/musicstructures.py b/qtgui/musicstructures.py index 9c4a5b8..7897f5d 100644 --- a/qtgui/musicstructures.py +++ b/qtgui/musicstructures.py @@ -383,6 +383,13 @@ class GuiTrack(QtWidgets.QGraphicsItem): #if barlinesTickList[0] == 0: #happens when there is a metrical instruction at tick 0. # del barlinesTickList[0] + + #Pen for the borders + pen = QtGui.QPen() + pen.setWidth(2) + pen.setColor(QtGui.QColor("black")) + + last = None offset = 0 for barnumber, barlineTick in enumerate(barlinesTickList): @@ -391,6 +398,7 @@ class GuiTrack(QtWidgets.QGraphicsItem): continue #don't draw the double barline last = barlineTick line = QtWidgets.QGraphicsLineItem(QtCore.QLineF(0, 0, 0, h)) + line.setPen(pen) line.setParentItem(self) self.barLines.append(line) line.setPos(barlineTick / constantsAndConfigs.ticksToPixelRatio, -2*constantsAndConfigs.stafflineGap)