on xenial help sign in
Animate a bit
commit665a167db42ff66ef73e8bfb62e58039886be13c authorAlbert Astals <albert.astals@canonical.com> dateTue 27 May 2014, 14:21 (12 years ago) parent74d4472
2 files changed+10−3
qml/Dash/DashDepartments.qml+3−3 qml/Dash/DashDepartmentsList.qml+7
qml/Dash/DashDepartments.qml+3−3
@@ -45,7 +45,7 @@ AbstractButton {
4545 width: parent.width
4646 anchors.top: departmentListView.top
4747 height: windowHeight
48− visible: showList
48+ visible: departmentListView.currentItem && departmentListView.currentItem.visible
4949 }
5050
5151 Image {
@@ -102,9 +102,9 @@ AbstractButton {
102102 onHeightChanged: prevHeight = height;
103103 anchors.top: root.bottom
104104 delegate: DashDepartmentsList {
105− visible: root.showList
105+ visible: height != 0
106106 width: departmentListView.width
107− height: department && department.loaded ? Math.min(implicitHeight, departmentListView.maxHeight) : departmentListView.prevHeight
107+ height: !root.showList ? 0 : department && department.loaded ? Math.min(implicitHeight, departmentListView.maxHeight) : departmentListView.prevHeight
108108 department: scope.getDepartment(departmentId)
109109 onEnterDepartment: {
110110 scope.loadDepartment(departmentId);
qml/Dash/DashDepartmentsList.qml+7
@@ -39,6 +39,13 @@ Item {
3939 }
4040 clip: true
4141
42+ Behavior on height {
43+ UbuntuNumberAnimation {
44+ id: heightAnimation
45+ duration: UbuntuAnimation.SnapDuration
46+ }
47+ }
48+
4249 Flickable {
4350 id: flickable
4451