Commit 69debdcf authored by Marco Martin's avatar Marco Martin
Browse files

use PagePool

todo: use PagePoolAction
parent 805caa25
......@@ -58,13 +58,12 @@ Kirigami.ScrollablePage {
}
Kirigami.PagePool {
id: pagePool
id: mainPagePool
}
ListView {
id: mainListView
currentIndex: -1
//currentIndex has focus, openPageIndex is the one actually open now
property int openPageIndex: -1
activeFocusOnTab: true
focus: true
......@@ -167,10 +166,10 @@ Kirigami.ScrollablePage {
return;
}
root.pageStack.pop(pageRoot);
root.pageStack.push(pagePool.pageForUrl("gallery/" + model.component + "Gallery.qml"));
mainListView.openPageIndex = index;
root.pageStack.push(mainPagePool.loadPage("gallery/" + model.component + "Gallery.qml"));
}
checked: mainListView.openPageIndex == index
checked: mainPagePool.resolvedUrl(page) == mainPagePool.lastLoadedUrl
highlighted: focus && ListView.isCurrentItem
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment