on xenial help sign in
Avoid conflict between dash vertical flickable and its bottom-edge DDA
cb447abDaniel d'Andrada
qml/Dash/Dash.qml+6
@@ -208,6 +208,12 @@ Showable {
208 }
208 }
209 }
209 }
210
210
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+
211 enabled: overviewController.progress == 0
217 enabled: overviewController.progress == 0
212 opacity: enabled ? 1 : 0
218 opacity: enabled ? 1 : 0
213 }
219 }
qml/Dash/DashContent.qml+4−1
@@ -23,6 +23,7 @@ import "../Components"
23Item {
23Item {
24 id: dashContent
24 id: dashContent
25
25
26+ property bool forceNonInteractive: false
26 property alias scopes: dashContentList.model
27 property alias scopes: dashContentList.model
27 readonly property alias currentIndex: dashContentList.currentIndex
28 readonly property alias currentIndex: dashContentList.currentIndex
28 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
29 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
@@ -101,7 +102,8 @@ Item {
101 id: dashContentList
102 id: dashContentList
102 objectName: "dashContentList"
103 objectName: "dashContentList"
103
104
105+ interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
104− interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
106+ && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
105 anchors.fill: parent
107 anchors.fill: parent
106 orientation: ListView.Horizontal
108 orientation: ListView.Horizontal
107 boundsBehavior: Flickable.DragAndOvershootBounds
109 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -180,6 +182,7 @@ Item {
180 item.paginationCount = Qt.binding(function() { return dashContentList.count } )
182 item.paginationCount = Qt.binding(function() { return dashContentList.count } )
181 item.paginationIndex = Qt.binding(function() { return dashContentList.currentIndex } )
183 item.paginationIndex = Qt.binding(function() { return dashContentList.currentIndex } )
182 item.holdingList = dashContentList;
184 item.holdingList = dashContentList;
185+ item.forceNonInteractive = Qt.binding(function() { return dashContent.forceNonInteractive } )
183 }
186 }
184 Connections {
187 Connections {
185 target: isCurrent ? scope : null
188 target: isCurrent ? scope : null
qml/Dash/GenericScopeView.qml+2
@@ -26,6 +26,7 @@ FocusScope {
26 id: scopeView
26 id: scopeView
27
27
28 readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].openList : false
28 readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].openList : false
29+ property bool forceNonInteractive: false
29 property var scope: null
30 property var scope: null
30 property SortFilterProxyModel categories: categoryFilter
31 property SortFilterProxyModel categories: categoryFilter
31 property bool isCurrent: false
32 property bool isCurrent: false
@@ -149,6 +150,7 @@ FocusScope {
149 ScopeListView {
150 ScopeListView {
150 id: categoryView
151 id: categoryView
151 objectName: "categoryListView"
152 objectName: "categoryListView"
153+ interactive: !forceNonInteractive
152
154
153 x: subPageLoader.open ? -width : 0
155 x: subPageLoader.open ? -width : 0
154 visible: x != -width
156 visible: x != -width