summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/flickr/common/ImageDetails.qml4
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/demos/declarative/flickr/common/ImageDetails.qml b/demos/declarative/flickr/common/ImageDetails.qml
index f91b365..9604f10 100644
--- a/demos/declarative/flickr/common/ImageDetails.qml
+++ b/demos/declarative/flickr/common/ImageDetails.qml
@@ -93,9 +93,7 @@ Flipable {
Image {
id: bigImage; source: container.photoUrl; scale: slider.value
- // Center image if it is smaller than the flickable area.
- x: imageContainer.width > width*scale ? (imageContainer.width - width*scale) / 2 : 0
- y: imageContainer.height > height*scale ? (imageContainer.height - height*scale) / 2 : 0
+ anchors.centerIn: parent;
smooth: !flick.moving
onStatusChanged : {
// Default scale shows the entire image.
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index c496c97..e2cef23 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1980,6 +1980,12 @@ void QDeclarativeListView::setHighlightResizeSpeed(qreal speed)
visible item at the time the mouse button is released. This mode is particularly
useful for moving one page at a time.
\endlist
+
+ snapMode does not affect the currentIndex. To update the
+ currentIndex as the list is moved set \e highlightRangeMode
+ to \e StrictlyEnforceRange.
+
+ \sa highlightRangeMode
*/
QDeclarativeListView::SnapMode QDeclarativeListView::snapMode() const
{