Fix ScrollBar plasma component incrementValue function

- The function was not bounding the value after incremented
    inside the flickable content size.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
This commit is contained in:
Daker Fernandes Pinheiro 2011-07-21 17:48:31 -03:00
parent db7cd67033
commit d318641dcf

View File

@ -54,10 +54,13 @@ Item {
if (!flickableItem)
return;
if (_isVertical)
flickableItem.contentY += increment;
else
flickableItem.contentX += increment;
if (_isVertical) {
flickableItem.contentY = Math.min(flickableItem.contentHeight,
flickableItem.contentY + increment);
} else {
flickableItem.contentX = Math.min(flickableItem.contentWidth,
flickableItem.contentX + increment);
}
}
Keys.onUpPressed: {