Commit 35bbdac8 authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix RadialSlider (overflow)

position varies between 0 and (n-1) when n images are available.
This fixes the widget disappearing when slider was at 100%.
parent f14f66e9
...@@ -100,7 +100,7 @@ void CtrlRadialSlider::draw( OSGraphics &rImage, int xDest, int yDest ) ...@@ -100,7 +100,7 @@ void CtrlRadialSlider::draw( OSGraphics &rImage, int xDest, int yDest )
void CtrlRadialSlider::onUpdate( Subject<VarPercent> &rVariable, void CtrlRadialSlider::onUpdate( Subject<VarPercent> &rVariable,
void *arg ) void *arg )
{ {
m_position = (int)( m_rVariable.get() * m_numImg ); m_position = (int)( m_rVariable.get() * ( m_numImg - 1 ) );
notifyLayout( m_width, m_height ); notifyLayout( m_width, m_height );
} }
......
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