on xenial help sign in
Avoid conflict between dash vertical flickable and its bottom-edge DDA
commitcb447ab3a51531bea1cab2abdf7b0d3fc9776ed4 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 8 Oct 2014, 08:52 (12 years ago) parentf267fe4
3 files changed+12−1
qml/Dash/Dash.qml+6 qml/Dash/DashContent.qml+4−1 qml/Dash/GenericScopeView.qml+2
qml/Dash/Dash.qml+6
@@ -208,6 +208,12 @@ Showable {
208208 }
209209 }
210210
211+ // This is to avoid the situation where a bottom-edge swipe would bring up the dash overview
212+ // (as expected) but would also cause the dash content flickable to move a bit, because
213+ // that flickable was getting the touch events while overviewDragHandle was still undecided
214+ // about whether that touch was indeed performing a directional drag gesture.
215+ forceNonInteractive: overviewDragHandle.status != DirectionalDragArea.WaitingForTouch
216+
211217 enabled: overviewController.progress == 0
212218 opacity: enabled ? 1 : 0
213219 }
qml/Dash/DashContent.qml+4−1
@@ -23,6 +23,7 @@ import "../Components"
2323Item {
2424 id: dashContent
2525
26+ property bool forceNonInteractive: false
2627 property alias scopes: dashContentList.model
2728 readonly property alias currentIndex: dashContentList.currentIndex
2829 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
@@ -101,7 +102,8 @@ Item {
101102 id: dashContentList
102103 objectName: "dashContentList"
103104
104− interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
105+ interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
106+ && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
105107 anchors.fill: parent
106108 orientation: ListView.Horizontal
107109 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -180,6 +182,7 @@ Item {
180182 item.paginationCount = Qt.binding(function() { return dashContentList.count } )
181183 item.paginationIndex = Qt.binding(function() { return dashContentList.currentIndex } )
182184 item.holdingList = dashContentList;
185+ item.forceNonInteractive = Qt.binding(function() { return dashContent.forceNonInteractive } )
183186 }
184187 Connections {
185188 target: isCurrent ? scope : null
qml/Dash/GenericScopeView.qml+2
@@ -26,6 +26,7 @@ FocusScope {
2626 id: scopeView
2727
2828 readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].openList : false
29+ property bool forceNonInteractive: false
2930 property var scope: null
3031 property SortFilterProxyModel categories: categoryFilter
3132 property bool isCurrent: false
@@ -149,6 +150,7 @@ FocusScope {
149150 ScopeListView {
150151 id: categoryView
151152 objectName: "categoryListView"
153+ interactive: !forceNonInteractive
152154
153155 x: subPageLoader.open ? -width : 0
154156 visible: x != -width