on xenial help sign in
reog++
commitd57547edb35c15716470c4aac7b4ce8e631ed939 authorAlbert Astals <albert.astals@canonical.com> dateWed 16 Apr 2014, 17:58 (13 years ago) parent46f012d
1 file changed+10−10
qml/Components/FilterGrid.qml+10−10
qml/Components/FilterGrid.qml+10−10
@@ -60,7 +60,7 @@ Item {
6060 readonly property alias pressDelay: iconTileGrid.pressDelay
6161 property alias highlightIndex: iconTileGrid.highlightIndex
6262 readonly property alias currentItem: iconTileGrid.currentItem
63− readonly property alias filtered: limitModel.filter
63+ readonly property alias filtered: d.filter
6464
6565 height: d.collapsed ? root.collapsedHeight : root.uncollapsedHeight
6666 clip: filterAnimation.running
@@ -77,7 +77,7 @@ Item {
7777 easing.type: Easing.InOutQuad
7878 onRunningChanged: {
7979 if (!running) {
80− limitModel.filter = d.collapsed;
80+ d.filter = d.collapsed;
8181 }
8282 heightBehaviour.enabled = false;
8383 }
@@ -86,6 +86,12 @@ Item {
8686
8787 QtObject {
8888 id: d
89+ // We do have filter and collapsed properties because we need to decouple
90+ // the real filtering with the animation since the closing animation
91+ // i.e. setFilter(false. true) we still need to not be filtering until
92+ // the animation finishes otherwise we hide the items when the animation
93+ // is still running
94+ property bool filter: true
8995 property bool collapsed: true
9096 }
9197
@@ -93,7 +99,7 @@ Item {
9399 heightBehaviour.enabled = animate;
94100 d.collapsed = filter;
95101 if (!animate || !filter) {
96− limitModel.filter = filter;
102+ d.filter = filter;
97103 }
98104 }
99105
@@ -112,14 +118,8 @@ Item {
112118
113119 model: LimitProxyModel {
114120 id: limitModel
115− // We do have filter and collapsed propertis because we need to decouple
116− // the real filtering with the animation since the closing animation
117− // i.e. setFilter(false. true) we still need to not be filtering until
118− // the animation finishes otherwise we hide the items when the animation
119− // is still running
120− property bool filter: true
121121 model: root.model
122− limit: filter ? rowsWhenCollapsed * iconTileGrid.columns : -1
122+ limit: d.filter ? rowsWhenCollapsed * iconTileGrid.columns : -1
123123 }
124124 }
125125}