diff --git a/qmlUiKirigami/ImageViewer.qml b/qmlUiKirigami/ImageViewer.qml --- a/qmlUiKirigami/ImageViewer.qml +++ b/qmlUiKirigami/ImageViewer.qml @@ -26,6 +26,7 @@ import QtQuick.Controls 2.0 as Controls import org.kde.kirigami 2.0 as Kirigami import org.kde.koko 0.1 as Koko +import org.kde.kquickcontrolsaddons 2.0 as KQA Kirigami.Page { id: root @@ -304,6 +305,33 @@ } } + footer: ListView { + height: Kirigami.Units.gridUnit * 4 + model: listView.model + orientation: Qt.Horizontal + currentIndex: listView.currentIndex + + highlight: Rectangle { + color: Kirigami.Theme.highlightColor + } + highlightMoveVelocity: 100000 + // Keeps the currentItem in the horizontalCenter of the page + preferredHighlightBegin: (applicationWindow().width / 2 ) - (Kirigami.Units.gridUnit * 2) + preferredHighlightEnd: (applicationWindow().width / 2 ) + (Kirigami.Units.gridUnit * 2) + highlightRangeMode: ListView.StrictlyEnforceRange + + delegate: Item { + height: Kirigami.Units.gridUnit * 4 + width: height + KQA.QImageItem { + height: Kirigami.Units.gridUnit * 3.8 + width: height + anchors.centerIn: parent + image: model.thumbnail + } + } + } + //FIXME: placeholder, will have to use the state machine Controls.Button { text: i18n("Back")