[vlc-commits] commit: skins2: fix RadialSlider (overflow) (Erwan Tulou )
git at videolan.org
git at videolan.org
Thu Jul 1 15:51:30 CEST 2010
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Jul 1 15:45:42 2010 +0200| [35bbdac8fd599bf00a5024efc7aae67b99faaef1] | committer: 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%.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35bbdac8fd599bf00a5024efc7aae67b99faaef1
---
modules/gui/skins2/controls/ctrl_radialslider.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/gui/skins2/controls/ctrl_radialslider.cpp b/modules/gui/skins2/controls/ctrl_radialslider.cpp
index 43f9eb8..a1bbec3 100644
--- a/modules/gui/skins2/controls/ctrl_radialslider.cpp
+++ b/modules/gui/skins2/controls/ctrl_radialslider.cpp
@@ -100,7 +100,7 @@ void CtrlRadialSlider::draw( OSGraphics &rImage, int xDest, int yDest )
void CtrlRadialSlider::onUpdate( Subject<VarPercent> &rVariable,
void *arg )
{
- m_position = (int)( m_rVariable.get() * m_numImg );
+ m_position = (int)( m_rVariable.get() * ( m_numImg - 1 ) );
notifyLayout( m_width, m_height );
}
More information about the vlc-commits
mailing list