on xenial help sign in
Small fixes here and there
commitb3088f844f7f5ee9b3427a7c5b7a7533ebe8b07c authorAlbert Astals <albert.astals@canonical.com> dateThu 29 May 2014, 11:10 (12 years ago) parentddee424
4 files changed+7−7
qml/Dash/DashDepartments.qml+1−1 qml/Dash/DashDepartmentsList.qml+1−1 tests/mocks/Unity/fake_scope.cpp+2−2 tests/qmltests/Dash/tst_DashContent.qml+3−3
qml/Dash/DashDepartments.qml+1−1
@@ -110,7 +110,7 @@ AbstractButton {
110110 visible: height != 0
111111 width: departmentListView.width
112112 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)
114114 currentDepartment: root.currentDepartment
115115 onEnterDepartment: {
116116 scope.loadDepartment(newDepartmentId);
qml/Dash/DashDepartmentsList.qml+1−1
@@ -99,7 +99,7 @@ Item {
9999 id: allButton
100100 anchors.top: backButton.bottom
101101 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))
103103 height: itemHeight
104104
105105 Label {
tests/mocks/Unity/fake_scope.cpp+2−2
@@ -166,8 +166,8 @@ unity::shell::scopes::DepartmentInterface* Scope::getDepartment(const QString& i
166166 parentId = "root";
167167 parentLabel = "root";
168168 } else if (id.startsWith("child")) {
169− parentId = "middle";
170− parentLabel = "middle";
169+ parentId = id.mid(5, 7);
170+ parentLabel = parentId;
171171 }
172172 return new Department(id, id, "all"+id, parentId, parentLabel, this);
173173}
tests/qmltests/Dash/tst_DashContent.qml+3−3
@@ -124,13 +124,13 @@ Item {
124124
125125 waitForRendering(categoryListView);
126126
127− categoryListView.contentY = units.gu(11);
128− console.log("contentY", categoryListView.contentY);
127+ categoryListView.contentY = units.gu(15);
128+ tryCompare(categoryListView, "contentY", units.gu(15));
129129
130130 var startX = dashContentList.width/2;
131131 var startY = dashContentList.height/2;
132132 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);
134134 }
135135
136136 function test_set_current_scope_reset() {