on xenial help sign in
Use anchors
c863425Albert Astals
qml/Dash/DashDepartments.qml+5−2
@@ -106,7 +106,11 @@ AbstractButton {
106 // nullifyDepartment: overrides departmentId to be null
106 // nullifyDepartment: overrides departmentId to be null
107 // This is used to "clear" the delegate when going "right" on the tree
107 // This is used to "clear" the delegate when going "right" on the tree
108 }
108 }
109− width: root.width
109+ anchors {
110+ left: parent.left
111+ right: parent.right
112+ top: root.bottom
113+ }
110 readonly property int maxHeight: (windowHeight - mapToItem(null, root.x, root.y).y) - units.gu(8)
114 readonly property int maxHeight: (windowHeight - mapToItem(null, root.x, root.y).y) - units.gu(8)
111 property int prevHeight: maxHeight
115 property int prevHeight: maxHeight
112 height: currentItem ? currentItem.height : maxHeight
116 height: currentItem ? currentItem.height : maxHeight
@@ -115,7 +119,6 @@ AbstractButton {
115 prevHeight = currentItem.desiredHeight;
119 prevHeight = currentItem.desiredHeight;
116 }
120 }
117 }
121 }
118− anchors.top: root.bottom
119 highlightMoveDuration: UbuntuAnimation.FastDuration
122 highlightMoveDuration: UbuntuAnimation.FastDuration
120 delegate: DashDepartmentsList {
123 delegate: DashDepartmentsList {
121 objectName: "department" + index
124 objectName: "department" + index