summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winMain.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/winMain.py b/winMain.py
index eabf523..4668dc2 100644
--- a/winMain.py
+++ b/winMain.py
@@ -19,7 +19,7 @@ class SongList(QtGui.QWidget):
minHeaderWidth=50
# alternating colors
colors=[QtGui.QColor(255,255,255), QtGui.QColor(230,230,255)]
- clrSel=QtGui.QColor(150,150,230) # color of selection
+ clrSel=QtGui.QColor(100,100,180) # color of selection
clrBg=QtGui.QColor(200,200,230) # background color
onDoubleClick=None
@@ -334,15 +334,18 @@ class SongList(QtGui.QWidget):
# determine color of row. Default is row-color, but can be overridden by
# (in this order): hover, selection, special row color!
clr=self.colors[row%2]
+ clrTxt=QtCore.Qt.black
for range in self.selRows:
if self.selMode==False and id>=range[0] and id<=range[1]:
clr=self.clrSel
+ clrTxt=QtCore.Qt.white
elif self.selMode and row>=min(range) and row<=max(range):
clr=self.clrSel
+ clrTxt=QtCore.Qt.white
if id==int(self.clrID[0]):
+ clrTxt=QtCore.Qt.white
clr=self.clrID[1]
- p.setPen(QtCore.Qt.black)
p.fillRect(QtCore.QRect(2, y, width-3, lineHeight), QtGui.QBrush(clr))
p.setPen(QtGui.QColor(230,230,255))
p.drawRect(QtCore.QRect(2, y, width-3, lineHeight))
@@ -352,11 +355,13 @@ class SongList(QtGui.QWidget):
if hdr[2]:
rect=p.boundingRect(x, y, hdr[1]-margin, lineHeight, QtCore.Qt.AlignLeft, str(song.getTag(hdr[0])))
text=str(song.getTag(hdr[0]))
+ p.setPen(clrTxt)
p.drawText(x, y+1, hdr[1]-margin, lineHeight, QtCore.Qt.AlignLeft, text)
if rect.width()>hdr[1]-margin:
p.fillRect(x+hdr[1]-15,y+1,15,lineHeight-1, QtGui.QBrush(clr))
p.drawText(x+hdr[1]-15,y+1,15,lineHeight-1, QtCore.Qt.AlignLeft, "...")
x+=hdr[1]
+ p.setPen(QtCore.Qt.black)
p.drawLine(QtCore.QPoint(x-margin,y), QtCore.QPoint(x-margin,y+lineHeight))
def paintEvent(self, event):