on xenial help sign in
Small fixes here and there
b3088f8Albert Astals
qml/Dash/DashDepartments.qml+1−1
@@ -110,7 +110,7 @@ AbstractButton {
110 visible: height != 0
110 visible: height != 0
111 width: departmentListView.width
111 width: departmentListView.width
112 height: !root.showList ? 0 : department && department.loaded ? Math.min(implicitHeight, departmentListView.maxHeight) : departmentListView.prevHeight
112 height: !root.showList ? 0 : department && department.loaded ? Math.min(implicitHeight, departmentListView.maxHeight) : departmentListView.prevHeight
113− department: nullifyDepartment ? null : scope.getDepartment(departmentId)
113+ department: (nullifyDepartment || !scope) ? null : scope.getDepartment(departmentId)
114 currentDepartment: root.currentDepartment
114 currentDepartment: root.currentDepartment
115 onEnterDepartment: {
115 onEnterDepartment: {
116 scope.loadDepartment(newDepartmentId);
116 scope.loadDepartment(newDepartmentId);
qml/Dash/DashDepartmentsList.qml+1−1
@@ -99,7 +99,7 @@ Item {
99 id: allButton
99 id: allButton
100 anchors.top: backButton.bottom
100 anchors.top: backButton.bottom
101 width: parent.width
101 width: parent.width
102− visible: department && (!department.isRoot || (!root.currentDepartment.isRoot && root.currentDepartment.parentId == department.departmentId))
102+ visible: department && (!department.isRoot || (root.currentDepartment && !root.currentDepartment.isRoot && root.currentDepartment.parentId == department.departmentId))
103 height: itemHeight
103 height: itemHeight
104
104
105 Label {
105 Label {
tests/mocks/Unity/fake_scope.cpp+2−2
@@ -166,8 +166,8 @@ unity::shell::scopes::DepartmentInterface* Scope::getDepartment(const QString& i
166 parentId = "root";
166 parentId = "root";
167 parentLabel = "root";
167 parentLabel = "root";
168 } else if (id.startsWith("child")) {
168 } else if (id.startsWith("child")) {
169− parentId = "middle";
169+ parentId = id.mid(5, 7);
170− parentLabel = "middle";
170+ parentLabel = parentId;
171 }
171 }
172 return new Department(id, id, "all"+id, parentId, parentLabel, this);
172 return new Department(id, id, "all"+id, parentId, parentLabel, this);
173}
173}
tests/qmltests/Dash/tst_DashContent.qml+3−3
@@ -124,13 +124,13 @@ Item {
124
124
125 waitForRendering(categoryListView);
125 waitForRendering(categoryListView);
126
126
127− categoryListView.contentY = units.gu(11);
127+ categoryListView.contentY = units.gu(15);
128− console.log("contentY", categoryListView.contentY);
128+ tryCompare(categoryListView, "contentY", units.gu(15));
129
129
130 var startX = dashContentList.width/2;
130 var startX = dashContentList.width/2;
131 var startY = dashContentList.height/2;
131 var startY = dashContentList.height/2;
132 touchFlick(dashContentList, startX - units.gu(2), startY, startX, startY);
132 touchFlick(dashContentList, startX - units.gu(2), startY, startX, startY);
133− tryCompare(categoryListView, "contentY", units.gu(11) - categoryListView.pageHeader.height);
133+ tryCompare(categoryListView, "contentY", units.gu(15) - categoryListView.pageHeader.height);
134 }
134 }
135
135
136 function test_set_current_scope_reset() {
136 function test_set_current_scope_reset() {