QML Plasma Components: fix a bug in scrollbar anchoring

Scrollbars can only be anchored to the associated flickable if it is
their parent or they share the same parent. The plausibility check
for this condition had a bug exluding also the latter case. That's fixed
now.
This commit is contained in:
Sebastian Gottfried 2012-12-09 18:35:48 +01:00
parent baf6c0ad84
commit 0ed74e50d0
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ Item {
//property bool handleEnabled: internalLoader.isVertical ? item.handle.height < item.contents.height : item.handle.width < item.contents.width
property bool handleEnabled: internalLoader.isVertical ? flickableItem.contentHeight > flickableItem.height : flickableItem.contentWidth > flickableItem.width
property bool isVertical: orientation == Qt.Vertical
property bool anchorableWithFlickable: parent == flickableItem || parent == flickableItem.parent
property bool anchorableWithFlickable: scrollbar.parent == flickableItem || scrollbar.parent == flickableItem.parent
function incrementValue(increment)
{

View File

@ -125,7 +125,7 @@ Item {
//property bool handleEnabled: internalLoader.isVertical ? item.handle.height < item.contents.height : item.handle.width < item.contents.width
property bool handleEnabled: internalLoader.isVertical ? flickableItem.contentHeight > flickableItem.height : flickableItem.contentWidth > flickableItem.width
property bool isVertical: orientation == Qt.Vertical
property bool anchorableWithFlickable: parent == flickableItem || parent == flickableItem.parent
property bool anchorableWithFlickable: scrollbar.parent == flickableItem || scrollbar.parent == flickableItem.parent
function incrementValue(increment)
{