Merge lp:~aacid/unity8/departmentListHorizontalScroll into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 1526
Merged at revision: 1531
Proposed branch: lp:~aacid/unity8/departmentListHorizontalScroll
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/waitForRenderingNoCrash
Diff against target: 101 lines (+30/-3)
5 files modified
qml/Dash/DashContent.qml (+2/-2)
qml/Dash/DashNavigation.qml (+4/-0)
qml/Dash/DashNavigationButton.qml (+2/-0)
qml/Dash/GenericScopeView.qml (+1/-1)
tests/qmltests/Dash/tst_DashContent.qml (+21/-0)
To merge this branch: bzr merge lp:~aacid/unity8/departmentListHorizontalScroll
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+245748@code.launchpad.net

This proposal supersedes a proposal from 2015-01-05.

Commit message

Disable Dash horizontal scroll while Navigation InverseMouseArea is pressed

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prerequisite

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
y
 * Did CI run pass? If not, please explain why.
y
 * Did you make sure that the branch does not contain spurious tags?
y

review: Approve
1528. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Dash/DashContent.qml'
--- qml/Dash/DashContent.qml 2014-12-15 22:42:44 +0000
+++ qml/Dash/DashContent.qml 2015-01-08 08:14:20 +0000
@@ -113,7 +113,7 @@
113 objectName: "dashContentList"113 objectName: "dashContentList"
114114
115 interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem115 interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
116 && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown116 && !currentItem.moving && !currentItem.navigationDisableParentInteractive && !currentItem.subPageShown
117 anchors.fill: parent117 anchors.fill: parent
118 orientation: ListView.Horizontal118 orientation: ListView.Horizontal
119 boundsBehavior: Flickable.DragAndOvershootBounds119 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -175,7 +175,7 @@
175 objectName: "scopeLoader" + index175 objectName: "scopeLoader" + index
176176
177 readonly property bool moving: item ? item.moving : false177 readonly property bool moving: item ? item.moving : false
178 readonly property bool navigationShown: item ? item.navigationShown : false178 readonly property bool navigationDisableParentInteractive: item ? item.navigationDisableParentInteractive : false
179 readonly property bool subPageShown: item ? item.subPageShown : false179 readonly property bool subPageShown: item ? item.subPageShown : false
180 readonly property var categoryView: item ? item.categoryView : null180 readonly property var categoryView: item ? item.categoryView : null
181 readonly property var theScope: scope181 readonly property var theScope: scope
182182
=== modified file 'qml/Dash/DashNavigation.qml'
--- qml/Dash/DashNavigation.qml 2014-09-25 15:46:28 +0000
+++ qml/Dash/DashNavigation.qml 2015-01-08 08:14:20 +0000
@@ -33,6 +33,10 @@
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 }
3640
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: backgroundItem42 readonly property var background: backgroundItem
3943
=== modified file 'qml/Dash/DashNavigationButton.qml'
--- qml/Dash/DashNavigationButton.qml 2014-12-15 12:39:00 +0000
+++ qml/Dash/DashNavigationButton.qml 2015-01-08 08:14:20 +0000
@@ -31,6 +31,7 @@
31 // Used by parent31 // Used by parent
32 readonly property var currentNavigation: scope && scope[hasNavigation] ? getNavigation(scope[currentNavigationId]) : null32 readonly property var currentNavigation: scope && scope[hasNavigation] ? getNavigation(scope[currentNavigationId]) : null
33 readonly property alias listView: navigationListView33 readonly property alias listView: navigationListView
34 readonly property bool inverseMousePressed: inverseMouseArea.pressed
34 property bool showList: false35 property bool showList: false
3536
36 // Internal37 // Internal
@@ -210,6 +211,7 @@
210 onCurrentNavigationChanged: setNewNavigation();211 onCurrentNavigationChanged: setNewNavigation();
211212
212 InverseMouseArea {213 InverseMouseArea {
214 id: inverseMouseArea
213 anchors.fill: navigationListView215 anchors.fill: navigationListView
214 enabled: root.showList216 enabled: root.showList
215 onPressed: root.showList = false217 onPressed: root.showList = false
216218
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml 2014-12-15 22:42:11 +0000
+++ qml/Dash/GenericScopeView.qml 2015-01-08 08:14:20 +0000
@@ -25,7 +25,7 @@
25FocusScope {25FocusScope {
26 id: scopeView26 id: scopeView
2727
28 readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].openList : false28 readonly property bool navigationDisableParentInteractive: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].disableParentInteractive : false
29 property bool forceNonInteractive: false29 property bool forceNonInteractive: false
30 property var scope: null30 property var scope: null
31 property SortFilterProxyModel categories: categoryFilter31 property SortFilterProxyModel categories: categoryFilter
3232
=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
--- tests/qmltests/Dash/tst_DashContent.qml 2014-12-15 14:06:38 +0000
+++ tests/qmltests/Dash/tst_DashContent.qml 2015-01-08 08:14:20 +0000
@@ -505,6 +505,27 @@
505 compare(dashAltNavigationButton.showList, false);505 compare(dashAltNavigationButton.showList, false);
506 }506 }
507507
508 function test_navigationsSwipeToNextScope() {
509 var dashContentList = findChild(dashContent, "dashContentList");
510 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
511 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
512 tryCompare(dashNavigation, "visible", true);
513 var dashNavigationButton = findChild(dashContentList.currentItem, "altNavigationButton");
514 verify(dashNavigationButton, "Can't find navigation button");
515
516 compare(dashNavigationButton.showList, false);
517 waitForRendering(dashNavigationButton);
518 mouseClick(dashNavigationButton, 0, 0);
519 compare(dashNavigationButton.showList, true);
520
521 mouseFlick(dashNavigationButton, dashNavigationButton.width - units.gu(1), units.gu(1), units.gu(1), units.gu(1));
522 compare(dashNavigationButton.showList, false);
523
524 var dashContentList = findChild(dashContent, "dashContentList");
525 expectFail("", "should not change the parent list.");
526 tryCompare(dashContentList, "currentIndex", 1);
527 }
528
508 function test_searchHint() {529 function test_searchHint() {
509 var dashContentList = findChild(dashContent, "dashContentList");530 var dashContentList = findChild(dashContent, "dashContentList");
510 verify(dashContentList !== null);531 verify(dashContentList !== null);

Subscribers

People subscribed via source and target branches