Relocate Settings and About pages

This commit is contained in:
Matti Viljanen 2020-03-21 03:25:26 +02:00
parent 3fe4589c21
commit 21fbc4a046
No known key found for this signature in database
GPG key ID: CF32A1495158F888
2 changed files with 11 additions and 10 deletions

View file

@ -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

View file

@ -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")