summaryrefslogtreecommitdiff
path: root/winMain.py
diff options
context:
space:
mode:
authorjerous <jerous@gmail.com>2008-05-29 19:00:05 +0200
committerjerous <jerous@gmail.com>2008-05-29 19:00:05 +0200
commitac98e1760e0ecacf1000aeac336821264cc80a54 (patch)
tree5b5ee701079b90e06fe22586fed15edbfcef4408 /winMain.py
parentb459ff192861e36b858a84c0043757aa12149399 (diff)
scrollbar tweaks
Diffstat (limited to 'winMain.py')
-rw-r--r--winMain.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/winMain.py b/winMain.py
index 0c7bc51..2c20206 100644
--- a/winMain.py
+++ b/winMain.py
@@ -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)