Key up and down works in playlist and repositions the view.

This commit is contained in:
Tobias Rundstrom 2006-03-11 19:37:41 -03:00
parent 33d3d29914
commit 13b9c47523
2 changed files with 19 additions and 2 deletions

View file

@ -84,6 +84,8 @@ PlaylistScroller::repositionButton (void)
PlaylistWidget *pw = dynamic_cast<PlaylistWidget *>(parent ());
/* x = 182.6 / (454 - 242) * 224 */
int bpos = (int)((float)(pw->getOffset ()) / (float)m_max * (float) getMax ());
if (bpos > getMax ())
bpos = getMax ();
m_button->move (0, bpos);
}