Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-21756

Cannot flick to the end of a horizontal list view if LayoutMirroring is enabled

    XMLWordPrintable

    Details

    • Commits:
      61f165239c4e87a8f6bcd594553b8fcea1a7f8d0

      Description

      Cannot flick to the end of a horizontal list view if LayoutMirroring is enabled in case snapMode is set SnapToItem and a preferred highlight range has been defined. Please use the attached test application for reproducing the issue.

      I also did some tracing to Qt Declarative source codes and it seems the content item's position gets calculate wrong in R2L case, which makes the QDeclarativeListView to assume it has reached end position one item too early:

      // list is grabbed with mouse and swept
      QDeclativeListView::viewPortMoved(): snapItem->Index 1
      QDeclativeListView::viewPortMoved(): snapItem->Index 2
      QDeclativeListView::viewPortMoved(): snapItem->Index 3
      QDeclarativeFlickablePrivate::handleMouseReleaseEvent
      QDeclarativeFlickablePrivate::handleMouseReleaseEvent: flicking
      QDeclarativeFlickablePrivate::flickX: velocity = 1500
      QDeclarativeListViewPrivate::flick: velocity 1500
      QDeclativeListView::viewPortMoved(): snapItem->Index 4 // scrolling to last item...
      QDeclarativeListViewPrivate::fixup: minExtent = 711 ; maxExtent = 261
      QDeclarativeListViewPrivate::fixup: viewPos = 491 ; highlightStart = 100 ; highlightEnd = 290
      QDeclarativeListViewPrivate::fixup: tempPosition = 491
      QDeclarativeListViewPrivate::fixup: position() = -851 // ...but it is way out of bounds...
      QDeclarativeListViewPrivate::fixup: topItem = 0x16dc0028 ;bottomItem = 0x0 ;isInBounds = false
      QDeclativeListView::viewPortMoved(): snapItem->Index 3 // ...backing to one before the last item

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            martjone Martin Jones (closed Nokia identity) (Inactive)
            Reporter:
            marko.pekkarinen@nokia.com Marko Pekkarinen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes