diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml index b586d32..424c18d 100644 --- a/qml/pages/MainPage.qml +++ b/qml/pages/MainPage.qml @@ -29,10 +29,12 @@ Page { "empty": qsTr("empty", "Battery fully depleted"), "unknown": qsTr("unknown", "Battery not detected, or faulty, or something") } + property bool settingsPagePushed: false onStatusChanged: { - if(status == PageStatus.Activating) { - alertTimer.interval = settings.interval * 1000; + if(status == PageStatus.Active && !settingsPagePushed) { + pageStack.pushAttached(Qt.resolvedUrl("SettingsPage.qml")) + settingsPagePushed = true; } } @@ -45,18 +47,10 @@ Page { VerticalScrollDecorator { flickable: mainFlickable } PullDownMenu { - MenuItem { - text: qsTr("About", "About this application") - onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml")) - } MenuItem { text: qsTr("Background", "More to read, background information...") onClicked: pageStack.push(Qt.resolvedUrl("InfoPage.qml")) } - MenuItem { - text: qsTr("Settings") - onClicked: pageStack.push(Qt.resolvedUrl("SettingsPage.qml")) - } } // Place our content in a Column. The PageHeader is always placed at the top diff --git a/qml/pages/SettingsPage.qml b/qml/pages/SettingsPage.qml index f7caef8..ffb758d 100644 --- a/qml/pages/SettingsPage.qml +++ b/qml/pages/SettingsPage.qml @@ -28,6 +28,13 @@ Page { VerticalScrollDecorator { flickable: mainFlickable } + PullDownMenu { + MenuItem { + text: qsTr("About", "About this application") + onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml")) + } + } + PageHeader { id: header title: qsTr("Settings")