diff options
author | Martin Jones <martin.jones@nokia.com> | 2012-07-26 13:14:50 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-27 03:08:24 +0200 |
commit | 3a045419ba588107d7730978c14643d68340f24b (patch) | |
tree | 2d9d84b06b4ae762dfc46a5bfbea5ee31f560e8d /src/quick/items/qquickgridview.cpp | |
parent | 4dcd5ae1e27252755a51dec139269bc4f998adb4 (diff) |
Add SnapPosition mode to positionViewAtIndex() in List/GridView.
This allows the view to be positioned on a snap boundary, which is
generally what is wanted when strict highlight mode s set or snapping
is enabled.
Task-number: QTBUG-26605
Change-Id: I6288dc8be4ff16c412b56ab449b6a9fb7b7ea889
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/items/qquickgridview.cpp')
-rw-r--r-- | src/quick/items/qquickgridview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp index 8f330b9031..518692a813 100644 --- a/src/quick/items/qquickgridview.cpp +++ b/src/quick/items/qquickgridview.cpp @@ -2490,6 +2490,9 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co bring the item into view. \li GridView.Contain - ensure the entire item is visible. If the item is larger than the view the item is positioned at the top (or left for \c GridView.TopToBottom flow) of the view. + \li GridView.SnapPosition - position the item at \l preferredHighlightBegin. This mode + is only valid if \l highlightRangeMode is StrictlyEnforceRange or snapping is enabled + via \l snapMode. \endlist If positioning the view at the index would cause empty space to be displayed at |