on xenial help sign in
Disable Dash horizontal scroll while Navigation InverseMouseArea is pressed
dc3ac5dAlbert Astals
qml/Dash/DashContent.qml+2−2
@@ -113,7 +113,7 @@ Item {
113 objectName: "dashContentList"
113 objectName: "dashContentList"
114
114
115 interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
115 interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
116− && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
116+ && !currentItem.moving && !currentItem.navigationDisableParentInteractive && !currentItem.subPageShown
117 anchors.fill: parent
117 anchors.fill: parent
118 orientation: ListView.Horizontal
118 orientation: ListView.Horizontal
119 boundsBehavior: Flickable.DragAndOvershootBounds
119 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -175,7 +175,7 @@ Item {
175 objectName: "scopeLoader" + index
175 objectName: "scopeLoader" + index
176
176
177 readonly property bool moving: item ? item.moving : false
177 readonly property bool moving: item ? item.moving : false
178− readonly property bool navigationShown: item ? item.navigationShown : false
178+ readonly property bool navigationDisableParentInteractive: item ? item.navigationDisableParentInteractive : false
179 readonly property bool subPageShown: item ? item.subPageShown : false
179 readonly property bool subPageShown: item ? item.subPageShown : false
180 readonly property var categoryView: item ? item.categoryView : null
180 readonly property var categoryView: item ? item.categoryView : null
181 readonly property var theScope: scope
181 readonly property var theScope: scope
qml/Dash/DashNavigation.qml+4
@@ -33,6 +33,10 @@ Item {
33 if (altNavigationButton.showList) return altNavigationButton.listView;
33 if (altNavigationButton.showList) return altNavigationButton.listView;
34 return null;
34 return null;
35 }
35 }
36+ readonly property bool disableParentInteractive: {
37+ return navigationButton.showList || altNavigationButton.showList ||
38+ navigationButton.inverseMousePressed || altNavigationButton.inverseMousePressed;
39+ }
36
40
37 // FIXME this is only here for highlight purposes (see Background.qml, too)
41 // FIXME this is only here for highlight purposes (see Background.qml, too)
38 readonly property var background: backgroundItem
42 readonly property var background: backgroundItem
qml/Dash/DashNavigationButton.qml+2
@@ -31,6 +31,7 @@ AbstractButton {
31 // Used by parent
31 // Used by parent
32 readonly property var currentNavigation: scope && scope[hasNavigation] ? getNavigation(scope[currentNavigationId]) : null
32 readonly property var currentNavigation: scope && scope[hasNavigation] ? getNavigation(scope[currentNavigationId]) : null
33 readonly property alias listView: navigationListView
33 readonly property alias listView: navigationListView
34+ readonly property bool inverseMousePressed: inverseMouseArea.pressed
34 property bool showList: false
35 property bool showList: false
35
36
36 // Internal
37 // Internal
@@ -210,6 +211,7 @@ AbstractButton {
210 onCurrentNavigationChanged: setNewNavigation();
211 onCurrentNavigationChanged: setNewNavigation();
211
212
212 InverseMouseArea {
213 InverseMouseArea {
214+ id: inverseMouseArea
213 anchors.fill: navigationListView
215 anchors.fill: navigationListView
214 enabled: root.showList
216 enabled: root.showList
215 onPressed: root.showList = false
217 onPressed: root.showList = false
qml/Dash/GenericScopeView.qml+1−1
@@ -25,7 +25,7 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
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 navigationDisableParentInteractive: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].disableParentInteractive : false
29 property bool forceNonInteractive: false
29 property bool forceNonInteractive: false
30 property var scope: null
30 property var scope: null
31 property SortFilterProxyModel categories: categoryFilter
31 property SortFilterProxyModel categories: categoryFilter