[vlc-commits] commit: skins2: fix RadialSlider (overflow) (Erwan Tulou )
git at videolan.org
git at videolan.org
Thu Jul 1 16:10:38 CEST 2010
vlc/vlc-1.1 | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Jul 1 15:45:42 2010 +0200| [846444ceaae9c11814ab8cffd2d4eea6a6e351c0] | 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%.
(cherry picked from commit 35bbdac8fd599bf00a5024efc7aae67b99faaef1)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=846444ceaae9c11814ab8cffd2d4eea6a6e351c0
---
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