summaryrefslogtreecommitdiffstats
path: root/examples/declarative/listview
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-27 01:47:16 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-27 01:47:16 (GMT)
commitbaedccfc09c3a95a7a900318cf384fd8a03e3eeb (patch)
treec922c2fc221ed11cb892bfa91f402caba895eb3a /examples/declarative/listview
parentb1a5b6c40c6c76d44d9afc24c6cddf1d2abf7b29 (diff)
downloadQt-baedccfc09c3a95a7a900318cf384fd8a03e3eeb.zip
Qt-baedccfc09c3a95a7a900318cf384fd8a03e3eeb.tar.gz
Qt-baedccfc09c3a95a7a900318cf384fd8a03e3eeb.tar.bz2
Improve highlight range API and fix incorrect list end calc.
Diffstat (limited to 'examples/declarative/listview')
-rw-r--r--examples/declarative/listview/itemlist.qml4
-rw-r--r--examples/declarative/listview/listview.qml7
2 files changed, 6 insertions, 5 deletions
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
index 6dfc90b..77f5c2d 100644
--- a/examples/declarative/listview/itemlist.qml
+++ b/examples/declarative/listview/itemlist.qml
@@ -30,8 +30,8 @@ Rectangle {
anchors.bottomMargin: 30
model: itemModel
preferredHighlightBegin: 0
- preferredHighlightEnd: 1
- strictlyEnforceHighlightRange: true
+ preferredHighlightEnd: 0
+ highlightRangeMode: "StrictlyEnforceRange"
orientation: "Horizontal"
}
diff --git a/examples/declarative/listview/listview.qml b/examples/declarative/listview/listview.qml
index 98974fd..b614904 100644
--- a/examples/declarative/listview/listview.qml
+++ b/examples/declarative/listview/listview.qml
@@ -41,7 +41,7 @@ Rectangle {
// current item within the the bounds of the range, however
// items will not scroll beyond the beginning or end of the view,
// forcing the highlight to move outside the range at the ends.
- // The third list sets strictlyEnforceHighlightRange to true
+ // The third list sets the highlightRangeMode to StrictlyEnforceRange
// and sets a range smaller than the height of an item. This
// forces the current item to change when the view is flicked,
// since the highlight is unable to move.
@@ -61,6 +61,7 @@ Rectangle {
model: MyPetsModel; delegate: petDelegate; highlight: petHighlight
preferredHighlightBegin: 80
preferredHighlightEnd: 220
+ highlightRangeMode: "ApplyRange"
currentIndex: list1.currentIndex
}
ListView {
@@ -69,7 +70,7 @@ Rectangle {
model: MyPetsModel; delegate: petDelegate; highlight: petHighlight
currentIndex: list1.currentIndex
preferredHighlightBegin: 125
- preferredHighlightEnd: 126
- strictlyEnforceHighlightRange: true
+ preferredHighlightEnd: 125
+ highlightRangeMode: "StrictlyEnforceRange"
}
}