diff --git a/declarativeimports/plasmacomponents/qml/ScrollBar.qml b/declarativeimports/plasmacomponents/qml/ScrollBar.qml index 2457a5ff3..f9323acf5 100644 --- a/declarativeimports/plasmacomponents/qml/ScrollBar.qml +++ b/declarativeimports/plasmacomponents/qml/ScrollBar.qml @@ -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; diff --git a/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml b/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml index 61025fe87..74d555cb8 100644 --- a/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml +++ b/declarativeimports/plasmacomponents/qml/ScrollDecorator.qml @@ -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