diff options
author | jerous <jerous@gmail.com> | 2008-05-29 19:00:05 +0200 |
---|---|---|
committer | jerous <jerous@gmail.com> | 2008-05-29 19:00:05 +0200 |
commit | ac98e1760e0ecacf1000aeac336821264cc80a54 (patch) | |
tree | 5b5ee701079b90e06fe22586fed15edbfcef4408 /winMain.py | |
parent | b459ff192861e36b858a84c0043757aa12149399 (diff) |
scrollbar tweaks
Diffstat (limited to 'winMain.py')
-rw-r--r-- | winMain.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -71,6 +71,7 @@ class SongList(QtGui.QWidget): self.hScrollbar.setMinimum(0) self.hScrollbar.setMaximum(1) self.hScrollbar.setValue(0) + self.hScrollbar.setPageStep(200) self.topRow=0 self.numRows=0 @@ -167,7 +168,7 @@ class SongList(QtGui.QWidget): self.repaint() def onHScroll(self, value): - self.xOffset=-self.hScrollbar.value() + self.xOffset=-self.hScrollbar.value()*2 self.repaint() def _pos2row(self, pos): @@ -181,7 +182,7 @@ class SongList(QtGui.QWidget): if self.vScrollbar.isVisible(): event.accept() numDegrees=event.delta() / 8 - numSteps=numDegrees + numSteps=5*numDegrees/15 self.vScrollbar.setValue(self.vScrollbar.value()-numSteps) @@ -194,6 +195,7 @@ class SongList(QtGui.QWidget): self.vScrollbar.setValue(0) else: self.vScrollbar.setVisible(True) + self.vScrollbar.setPageStep(self.numRows-2) self.vScrollbar.setMinimum(0) self.vScrollbar.setMaximum(self.fNumSongs-self.numRows+1) self.vScrollbar.resize(self.scrollbarWidth, self.height()-self.lineHeight-1) @@ -208,7 +210,7 @@ class SongList(QtGui.QWidget): if self.scrollWidth>self.width(): self.hScrollbar.setVisible(True) self.hScrollbar.setMinimum(0) - self.hScrollbar.setMaximum(self.scrollWidth-self.width()) + self.hScrollbar.setMaximum((self.scrollWidth-self.width())/2) self.hScrollbar.resize(self.width(), self.lineHeight) self.hScrollbar.move(0, self.height()-self.lineHeight-1) |