Swiping through full resolution images
The last page we have to implement in gallery-mobile
is the full resolution image page. In Chapter 4, Conquering the Desktop UI, we navigated through the images using previous/next buttons. In this chapter, we target the mobile platform. Therefore, navigation should be effected using a touch-based gesture: a fling.
Here is the implementation of this new PicturePage.qml
file:
import QtQuick 2.0 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.0 import "." PageTheme { property string pictureName property int pictureIndex toolbarTitle: pictureName ListView { id: pictureListView model: pictureModel anchors.fill: parent spacing: 5 orientation: Qt.Horizontal snapMode: ListView.SnapOneItem currentIndex: pictureIndex Component.onCompleted: { positionViewAtIndex(currentIndex, ListView.SnapPosition) ...