@@ -85,70 +85,20 @@ Item {
86 anchors.fill: parent
86 anchors.fill: parent
93− dashContentList.currentIndex = dashContentList.currentIndexBeforeResize;
94− resetCurrentIndexTimer.stop();
95− dashContentList.currentIndexBeforeResize = -1;
99− id: resetCurrentIndexTimer
103− dashContentList.currentIndex = dashContentList.currentIndexBeforeResize;
107− function onSizeChanged() {
108− if (!resizeTimer.running) {
109− dashContentList.currentIndexBeforeResize = dashContentList.currentIndex;
110− resizeTimer.start();
112− resizeTimer.restart();
118− dashContentList.width = dashContentListHolder.width;
123− dashContentList.height = dashContentListHolder.height;
126 ListView {
88 ListView {
127 id: dashContentList
89 id: dashContentList
128 objectName: "dashContentList"
90 objectName: "dashContentList"
130− interactive: dashContent.scopes.loaded && !previewListView.open && currentItem && !currentItem.moving
92+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving
131− && !resizeTimer.running
133− property int currentIndexBeforeResize: -1
134− onCurrentIndexChanged: {
135− if (resizeTimer.running && currentIndex != currentIndexBeforeResize) {
136− // Bogus ListView currentIndex change caused by the resize.
137− // Work around this bug by resetting it to its value before the resize
139− // But we have to do it outside its own onChanged slot, hence the timer.
140− resetCurrentIndexTimer.start();
144− //anchors.fill: parent /* working around the "currentIndex change due to resize" bug */
94+ anchors.fill: parent
145 model: dashContent.model
95 model: dashContent.model
146 orientation: ListView.Horizontal
96 orientation: ListView.Horizontal
147 boundsBehavior: Flickable.DragAndOvershootBounds
97 boundsBehavior: Flickable.DragAndOvershootBounds
148 flickDeceleration: units.gu(625)
98 flickDeceleration: units.gu(625)
149 maximumFlickVelocity: width * 5
99 maximumFlickVelocity: width * 5
150 snapMode: ListView.SnapOneItem
100 snapMode: ListView.SnapOneItem
151− highlightMoveDuration: 0 //250 /* working around the "currentIndex change due to resize" bug */
101+ highlightMoveDuration: 250
152 highlightRangeMode: ListView.StrictlyEnforceRange
102 highlightRangeMode: ListView.StrictlyEnforceRange
153 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
103 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
154 cacheBuffer: 1073741823
104 cacheBuffer: 1073741823