From 6b88b4bf4dd3cc30bed73f0ab3642d15ce9ef430 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sat, 7 Jul 2018 16:48:53 +0200 Subject: [PATCH] fix the new menu --- nymea-app/ui/MainPage.qml | 8 ++++---- nymea-app/ui/components/FancyHeader.qml | 4 ++-- nymea-app/ui/components/MeaListItemDelegate.qml | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nymea-app/ui/MainPage.qml b/nymea-app/ui/MainPage.qml index a957a272..1b989aef 100644 --- a/nymea-app/ui/MainPage.qml +++ b/nymea-app/ui/MainPage.qml @@ -14,10 +14,10 @@ Page { title: swipeView.currentItem.title model: ListModel { - ListElement { iconSource: "../images/share.svg"; text: qsTr("Configure things"); page: "EditDevicesPage" } - ListElement { iconSource: "../images/magic.svg"; text: qsTr("Magic"); page: "MagicPage" } - ListElement { iconSource: "../images/settings.svg"; text: qsTr("System settings"); page: "SettingsPage" } - ListElement { iconSource: "../images/stock_application.svg"; text: qsTr("App settings"); page: "AppSettingsPage" } + ListElement { iconSource: "../images/share.svg"; text: qsTr("Configure things"); page: "../EditDevicesPage.qml" } + ListElement { iconSource: "../images/magic.svg"; text: qsTr("Magic"); page: "../MagicPage.qml" } + ListElement { iconSource: "../images/settings.svg"; text: qsTr("System settings"); page: "../SettingsPage.qml" } + ListElement { iconSource: "../images/stock_application.svg"; text: qsTr("App settings"); page: "../AppSettingsPage.qml" } } } diff --git a/nymea-app/ui/components/FancyHeader.qml b/nymea-app/ui/components/FancyHeader.qml index 274360af..432ab946 100644 --- a/nymea-app/ui/components/FancyHeader.qml +++ b/nymea-app/ui/components/FancyHeader.qml @@ -86,8 +86,8 @@ ToolBar { width: app.iconSize * 3 onClicked: { - header.menuOpen = false - pageStack.push(Qt.resolvedUrl(model.page + ".qml")) + d.menuOpen = false + pageStack.push(model.page) } Rectangle { diff --git a/nymea-app/ui/components/MeaListItemDelegate.qml b/nymea-app/ui/components/MeaListItemDelegate.qml index 2601ed8b..f966a7c2 100644 --- a/nymea-app/ui/components/MeaListItemDelegate.qml +++ b/nymea-app/ui/components/MeaListItemDelegate.qml @@ -34,6 +34,8 @@ SwipeDelegate { Layout.fillHeight: true text: root.text wrapMode: Text.WordWrap + maximumLineCount: 2 + elide: Text.ElideRight verticalAlignment: Text.AlignVCenter } Label {