diff options
author | jerous <jerous@gmail.com> | 2008-05-30 01:53:44 +0200 |
---|---|---|
committer | jerous <jerous@gmail.com> | 2008-05-30 01:53:44 +0200 |
commit | 4b25a14e3a9763463f0dda40c706c19b10d26c0c (patch) | |
tree | c5aaf3377884064f572804652159b47282913877 /winMain.py | |
parent | 8cb5b1a52bbcb938666e1f3bfb8c7571c594d2c4 (diff) |
some gfx glitch fixes
Diffstat (limited to 'winMain.py')
-rw-r--r-- | winMain.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -18,7 +18,7 @@ class SongList(QtGui.QWidget): lineHeight=20 margin=4 scrollbarWidth=15 - minHeaderWidth=40 + minHeaderWidth=50 # alternating colors colors=[QtGui.QColor(255,255,255), QtGui.QColor(230,230,255)] clrHl=QtGui.QColor(127,127,127) # highlighted by mouse @@ -348,6 +348,9 @@ class SongList(QtGui.QWidget): 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)) + p.setPen(QtCore.Qt.black) x=margin+self.xOffset for hdr in self.headers: if hdr[2]: @@ -355,12 +358,10 @@ class SongList(QtGui.QWidget): text=str(song.getTag(hdr[0])) 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,15,lineHeight, QtGui.QBrush(clr)) - p.drawText(x+hdr[1]-15,y,15,lineHeight, QtCore.Qt.AlignLeft, "...") + 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.drawLine(QtCore.QPoint(x-margin,y), QtCore.QPoint(x-margin,y+lineHeight)) - p.setPen(QtGui.QColor(230,230,255)) - p.drawRect(QtCore.QRect(2, y, width-3, lineHeight)) def paintEvent(self, event): lineHeight=self.lineHeight @@ -401,6 +402,7 @@ class SongList(QtGui.QWidget): if hdr[2]: p.drawText(QtCore.QPoint(x, lineHeight-margin), hdr[0]) x+=hdr[1] + p.drawLine(QtCore.QPoint(x-margin,0), QtCore.QPoint(x-margin,lineHeight)) if self.songs==None: return |