Commit 704a9d96 authored by Antoine Cellerier's avatar Antoine Cellerier

* ctrl_*.cpp : mouse scrolling behavior change

 * skin_parser.cpp : add comment so people know where to look to fix the
                     Playlist slider breakage.
parent 9f4f40e2
......@@ -332,13 +332,14 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
int direction = ((EvtScroll&)rEvent).getDirection();
double percentage = m_rList.getPositionVar().get();
double step = 2.0 / (double)m_rList.size();
if( direction == EvtScroll::kUp )
{
percentage += SCROLL_STEP;
percentage += step;
}
else
{
percentage -= SCROLL_STEP;
percentage -= step;
}
m_rList.getPositionVar().set( percentage );
}
......
......@@ -345,13 +345,14 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
int direction = ((EvtScroll&)rEvent).getDirection();
double percentage = m_rTree.getPositionVar().get();
double step = 2.0 / (double)m_rTree.visibleItems();
if( direction == EvtScroll::kUp )
{
percentage += SCROLL_STEP;
percentage += step;
}
else
{
percentage -= SCROLL_STEP;
percentage -= step;
}
m_rTree.getPositionVar().set( percentage );
}
......
......@@ -331,7 +331,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
{
// Slider associated to a list
newValue = "playlist.slider";
// FIXME
// FIXME : this breaks slider usage in old style Playlists
newValue = "playtree.slider";
}
const BuilderData::Slider slider( uniqueId( attr["id"] ),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment