on xenial help sign in
Rename dividerDots* to pagination*.
a8d7f84Ying-Chun Liu
qml/Components/PageHeader.qml+6−9
@@ -35,8 +35,8 @@ Item {
35 property bool searchInProgress: false
35 property bool searchInProgress: false
36
36
37 property alias bottomItem: bottomContainer.children
37 property alias bottomItem: bottomContainer.children
38− property int dividerDotsCount: 0
38+ property int paginationCount: 0
39− property int dividerDotsIndex: -1
39+ property int paginationIndex: -1
40
40
41 // TODO We should use foreground for the icons
41 // TODO We should use foreground for the icons
42 // of the toolbar but unfortunately Action does not have
42 // of the toolbar but unfortunately Action does not have
@@ -280,18 +280,15 @@ Item {
280 }
280 }
281
281
282 Row {
282 Row {
283− id: dividerDotsRow
284− objectName: "dividerDotsRow"
285 spacing: units.gu(.5)
283 spacing: units.gu(.5)
286 Repeater {
284 Repeater {
287− id: dividerDotsRepeater
285+ objectName: "paginationRepeater"
288− objectName: "dividerDotsRepeater"
286+ model: root.paginationCount
289− model: root.dividerDotsCount
290 Image {
287 Image {
291− objectName: "dividerDots_" + index
288+ objectName: "paginationDots_" + index
292 height: units.gu(1)
289 height: units.gu(1)
293 width: height
290 width: height
294− source: (index == root.dividerDotsIndex) ? "graphics/dot_on.png" : "graphics/dot_off.png"
291+ source: (index == root.paginationIndex) ? "graphics/dot_on.png" : "graphics/dot_off.png"
295 }
292 }
296 }
293 }
297 anchors {
294 anchors {
qml/Dash/DashContent.qml+2−2
@@ -141,8 +141,8 @@ Item {
141 item.scope = Qt.binding(function() { return scope })
141 item.scope = Qt.binding(function() { return scope })
142 item.isCurrent = Qt.binding(function() { return visible && ListView.isCurrentItem })
142 item.isCurrent = Qt.binding(function() { return visible && ListView.isCurrentItem })
143 dashContent.scopeLoaded(item.scope.id)
143 dashContent.scopeLoaded(item.scope.id)
144− item.dividerDotsCount = Qt.binding(function() { return dashContentList.count } )
144+ item.paginationCount = Qt.binding(function() { return dashContentList.count } )
145− item.dividerDotsIndex = Qt.binding(function() { return dashContentList.currentIndex } )
145+ item.paginationIndex = Qt.binding(function() { return dashContentList.currentIndex } )
146 }
146 }
147 Connections {
147 Connections {
148 target: isCurrent ? scope : null
148 target: isCurrent ? scope : null
qml/Dash/GenericScopeView.qml+2−2
@@ -33,8 +33,8 @@ FocusScope {
33 property bool hasBackAction: false
33 property bool hasBackAction: false
34 property bool enableHeightBehaviorOnNextCreation: false
34 property bool enableHeightBehaviorOnNextCreation: false
35 property var categoryView: categoryView
35 property var categoryView: categoryView
36− property alias dividerDotsCount: pageHeader.dividerDotsCount
36+ property alias paginationCount: pageHeader.paginationCount
37− property alias dividerDotsIndex: pageHeader.dividerDotsIndex
37+ property alias paginationIndex: pageHeader.paginationIndex
38
38
39 property var scopeStyle: ScopeStyle {
39 property var scopeStyle: ScopeStyle {
40 style: scope ? scope.customizations : {}
40 style: scope ? scope.customizations : {}
tests/qmltests/Components/tst_PageHeader.qml+14−14
@@ -175,25 +175,25 @@ Item {
175 ];
175 ];
176 }
176 }
177
177
178− function test_divider_dots() {
178+ function test_pagination() {
179− var dividerDotsRepeater = findChild(pageHeader, "dividerDotsRepeater");
179+ var paginationRepeater = findChild(pageHeader, "paginationRepeater");
180− tryCompare(dividerDotsRepeater, "count", 0);
180+ tryCompare(paginationRepeater, "count", 0);
181− pageHeader.dividerDotsCount = 5;
181+ pageHeader.paginationCount = 5;
182− tryCompare(dividerDotsRepeater, "count", 5);
182+ tryCompare(paginationRepeater, "count", 5);
183− for (var i=0; i<pageHeader.dividerDotsCount; i++) {
183+ for (var i=0; i<pageHeader.paginationCount; i++) {
184− pageHeader.dividerDotsIndex = i;
184+ pageHeader.paginationIndex = i;
185− for (var j=0; j<dividerDotsRepeater.count; j++) {
185+ for (var j=0; j<paginationRepeater.count; j++) {
186− var dividerDot = findChild(pageHeader, "dividerDots_"+j);
186+ var paginationDot = findChild(pageHeader, "paginationDots_"+j);
187 if (i==j) {
187 if (i==j) {
188− compare(dividerDot.source.toString().indexOf("dot_on") > -1, true);
188+ compare(paginationDot.source.toString().indexOf("dot_on") > -1, true);
189 } else {
189 } else {
190− compare(dividerDot.source.toString().indexOf("dot_off") > -1, true);
190+ compare(paginationDot.source.toString().indexOf("dot_off") > -1, true);
191 }
191 }
192 }
192 }
193 }
193 }
194− pageHeader.dividerDotsIndex = -1;
194+ pageHeader.paginationIndex = -1;
195− pageHeader.dividerDotsCount = 0;
195+ pageHeader.paginationCount = 0;
196− tryCompare(dividerDotsRepeater, "count", 0);
196+ tryCompare(paginationRepeater, "count", 0);
197 }
197 }
198
198
199 function test_tap_outside_closes_popup(data) {
199 function test_tap_outside_closes_popup(data) {