=== modified file 'libertine/qml/ContainersView.qml' --- libertine/qml/ContainersView.qml 2016-05-09 17:12:24 +0000 +++ libertine/qml/ContainersView.qml 2016-05-09 19:27:24 +0000 @@ -28,6 +28,7 @@ */ Page { id: containersView + header: PageHeader { id: pageHeader title: i18n.tr("My Containers") @@ -51,8 +52,12 @@ UbuntuListView { anchors { topMargin: pageHeader.height - fill: parent + top: parent.top + left: parent.left + right: parent.right } + + height: contentItem.childrenRect.height model: containerConfigList delegate: ListItem { @@ -114,6 +119,7 @@ onTriggered: { mainView.currentContainer = containerId containerAppsList.setContainerApps(mainView.currentContainer) + console.debug(pageStack) pageStack.push(Qt.resolvedUrl("HomeView.qml")) } } === modified file 'libertine/qml/HomeView.qml' --- libertine/qml/HomeView.qml 2016-05-06 21:13:01 +0000 +++ libertine/qml/HomeView.qml 2016-05-09 19:27:55 +0000 @@ -77,7 +77,7 @@ else { appExistsWarning.text = i18n.tr("The %1 package is already installed. Please try a different package name.").arg(enterPackageInput.text) appExistsWarning.visible = true - enterPackageInput.text = "" + enterPackageInput.text = "" } } } @@ -97,30 +97,30 @@ } Component { - id: settingsMenu - ActionSelectionPopover { - actions: ActionList { - Action { - text: i18n.tr("Manage Container") - onTriggered: { + id: settingsMenu + ActionSelectionPopover { + actions: ActionList { + Action { + text: i18n.tr("Manage Container") + onTriggered: { pageStack.push(Qt.resolvedUrl("ManageContainer.qml")) } - } + } Action { text: i18n.tr("Container Information") onTriggered: { pageStack.push(Qt.resolvedUrl("ContainerInfoView.qml")) } } - Action { - text: i18n.tr("Switch Container") - onTriggered: { + Action { + text: i18n.tr("Switch Container") + onTriggered: { pageStack.pop() pageStack.push(Qt.resolvedUrl("ContainersView.qml")) } - } - } - } + } + } + } } Component { @@ -138,7 +138,7 @@ text: i18n.tr("Choose Debian package to install") onTriggered: { var packages = containerConfigList.getDebianPackageFiles() - pageStack.push(Qt.resolvedUrl("DebianPackagePicker.qml"), {packageList: packages}) + pageStack.push(Qt.resolvedUrl("DebianPackagePicker.qml"), {packageList: packages}) } } Action { @@ -169,8 +169,11 @@ id: appsList anchors { topMargin: pageHeader.height - fill: parent + top: parent.top + left: parent.left + right: parent.right } + height: contentItem.childrenRect.height model: containerAppsList visible: !containerAppsList.empty() ? true : false delegate: ListItem { === modified file 'libertine/qml/libertine.qml' --- libertine/qml/libertine.qml 2016-05-06 21:13:01 +0000 +++ libertine/qml/libertine.qml 2016-05-09 19:37:23 +0000 @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + import QtQuick 2.4 import Ubuntu.Components 1.3 import Ubuntu.Components.Popups 1.3 @@ -33,23 +34,65 @@ signal packageInstallFinished(string package_name, bool result, string message) signal packageRemoveFinished(string package_name, bool result, string message) - PageStack { + AdaptivePageLayout { id: pageStack + asynchronous: true + primaryPage: Page {} + layouts:[ + PageColumnsLayout { + when: width > units.gu(180) + PageColumn { + minimumWidth: width/3 + } + PageColumn { + minimumWidth: width/3 + } + PageColumn { + minimumWidth: width/3 + } + }, + PageColumnsLayout { + when: width >= units.gu(90) + PageColumn { + minimumWidth: width/2 + } + PageColumn { + minimumWidth: width/2 + } + }, + PageColumnsLayout { + when: true + PageColumn { + minimumWidth: width + } + } + ] + + function pushHard(page) { + return addPageToCurrentColumn(primaryPage, page) + } + + function push(page) { + return addPageToNextColumn(primaryPage, page) + } } Component.onCompleted: { mainView.currentContainer = containerConfigList.defaultContainerId - - if (!containerConfigList.empty()) { - pageStack.push(Qt.resolvedUrl("ContainersView.qml")) - if (mainView.currentContainer) { - containerAppsList.setContainerApps(mainView.currentContainer) - pageStack.push(Qt.resolvedUrl("HomeView.qml")) + var incubator = pageStack.pushHard(Qt.resolvedUrl("ContainersView.qml")) + incubator.onStatusChanged = function(status) { + if (status === Component.Ready) { + if (!containerConfigList.empty()) { + if (mainView.currentContainer) { + containerAppsList.setContainerApps(mainView.currentContainer) + pageStack.push(Qt.resolvedUrl("HomeView.qml")) + } + } + else { + pageStack.push(Qt.resolvedUrl("WelcomeView.qml")) + } } } - else { - pageStack.push(Qt.resolvedUrl("WelcomeView.qml")) - } } onPackageInstallFinished: {