fix anchors of scroll indicators

This commit is contained in:
Marco Martin 2011-10-28 22:32:45 +02:00
parent 77fa1ee910
commit b40acc4903
2 changed files with 16 additions and 2 deletions

View File

@ -29,7 +29,7 @@ Item {
property bool interactive
// Plasma API
property int orientation: Qt.Horizontal
property int orientation: Qt.Vertical
property bool animated: true
property bool inverted: false
property bool updateValueWhileDragging: true
@ -51,6 +51,13 @@ Item {
visible: flickableItem && handle.width < contents.width
anchors {
right: flickableItem.right
left: (orientation == Qt.Vertical) ? undefined : flickableItem.left
top: (orientation == Qt.Vertical) ? flickableItem.top : undefined
bottom: flickableItem.bottom
}
function incrementValue(increment) {
if (!flickableItem)
return;

View File

@ -27,7 +27,7 @@ Item {
property Flickable flickableItem
// Plasma API
property int orientation: Qt.Horizontal
property int orientation: Qt.Vertical
property bool inverted: false
// Convinience API
@ -41,6 +41,13 @@ Item {
visible: flickableItem && handle.width < contents.width
anchors {
right: flickableItem.right
left: (orientation == Qt.Vertical) ? undefined : flickableItem.left
top: (orientation == Qt.Vertical) ? flickableItem.top : undefined
bottom: flickableItem.bottom
}
Item {
width: _isVertical ? scrollDecorator.height : scrollDecorator.width
height: _isVertical ? scrollDecorator.width : scrollDecorator.height