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) if (!flickableItem)
return; return;
if (_isVertical) if (_isVertical) {
flickableItem.contentY += increment; flickableItem.contentY = Math.min(flickableItem.contentHeight,
else flickableItem.contentY + increment);
flickableItem.contentX += increment; } else {
flickableItem.contentX = Math.min(flickableItem.contentWidth,
flickableItem.contentX + increment);
}
} }
Keys.onUpPressed: { Keys.onUpPressed: {