From 77d58f455333988f872348c13abbeec1ad4820fd Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 20 Dec 2015 03:33:43 +0200 Subject: [PATCH] Fixed: Stuck scrollbar --- code/nel/src/gui/ctrl_scroll.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index d0d7483b3..ad2ca14f5 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -1135,7 +1135,7 @@ namespace NLGUI factor = factor * (1.0f-(_TrackPos / favoid0((float)(getHReal()-_TrackSize)))); // Compute Steped target - sint32 nexOfsY= (sint32) (_Inverted ? factor : -factor); + sint32 nexOfsY= (sint32) floorf(0.5+(_Inverted ? factor : -factor)); if(_TargetStepY>1) nexOfsY= ((nexOfsY+_TargetStepY/2)/_TargetStepY) * _TargetStepY; _Target->setOfsY (nexOfsY); @@ -1154,7 +1154,7 @@ namespace NLGUI factor = factor * (1.0f-(_TrackPos / favoid0((float)(getWReal()-_TrackSize)))); // Compute Steped target - sint32 nexOfsX= (sint32) (_Inverted ? factor : -factor); + sint32 nexOfsX= (sint32) floorf(0.5+(_Inverted ? factor : -factor)); if(_TargetStepX>1) nexOfsX= ((nexOfsX+_TargetStepX/2)/_TargetStepX) * _TargetStepX; _Target->setOfsX (nexOfsX);