Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.2.1
-
None
-
I6416d0e23c3ef898887a7b3e3fcdc1dc12853548
Description
This impacts the flick dynamics as well as the value of visibleArea.heightRatio (which becomes outside the 0-1 range promised in the documentation).
The following example illustrates the issue by comparison with ListView. In this example the ListView flick dynamics and scrollbar are correct, while the Flickable's are not.
import QtQuick 2.0 Item { width: 800; height: 600 Rectangle { anchors.bottom: parent.bottom width: parent.width height: 200 color: "blue" } Row { ListView { id: listView width: 400; height: 400 model: 1 delegate: Rectangle { width: 400 height: 200 color: "green" Text { anchors.centerIn: parent color: "white" text: "ListView" } } children: [ Rectangle { anchors.right: parent.right y: listView.visibleArea.yPosition * listView.height width: 10 height: listView.visibleArea.heightRatio * listView.height color: "black" } ] } Flickable { id: flickable width: 400; height: 400 contentHeight: 200 contentWidth: 400 Rectangle { width: 400 height: 200 color: "red" Text { anchors.centerIn: parent color: "white" text: "Flickable" } } children: [ Rectangle { anchors.right: parent.right y: flickable.visibleArea.yPosition * flickable.height width: 10 height: flickable.visibleArea.heightRatio * flickable.height color: "black" } ] } } }