This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
fanny-app/qml/Pages/StartPage.qml

120 lines
2.7 KiB
QML
Raw Normal View History

2018-12-22 13:43:43 +01:00
import QtQuick 2.9
import QtQuick.Controls 2.4
import "../Components"
Page {
id: root
objectName: "MainPage"
Shortcut {
sequences: ["Esc", "Back"]
enabled: stackView.depth > 1
onActivated: {
stackView.pop()
}
}
Item {
id: mainMenu
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
width: childrenRect.width
height: childrenRect.height
property int buttonHeight: app.landscape() ? root.height * (0.3*0.8):buttonWidth
property int buttonWidth: app.landscape() ? buttonHeight:root.width * (0.5*0.8)
FancyButton {
id: todayButton
image: "qrc:/graphics/sheute.png"
anchors {
left: parent.left
top: parent.top
}
width: mainMenu.buttonWidth
height: mainMenu.buttonHeight
}
FancyButton {
id: tomorrowButton
image: "qrc:/graphics/smorgen.png"
anchors {
left: todayButton.right
verticalCenter: todayButton.verticalCenter
}
width: mainMenu.buttonWidth
height: mainMenu.buttonHeight
}
FancyButton {
id: foodplanButton
image: "qrc:/graphics/images/TreffpunktFannyLogoDark.png"
anchors {
top: todayButton.bottom
horizontalCenter: todayButton.horizontalCenter
}
width: mainMenu.buttonWidth
height: mainMenu.buttonHeight
}
FancyButton {
id: fannyButton
image: "qrc:/graphics/images/FannyLogoDark.jpg"
anchors {
top: tomorrowButton.bottom
horizontalCenter: tomorrowButton.horizontalCenter
}
width: mainMenu.buttonWidth
height: mainMenu.buttonHeight
}
FancyButton {
id: logoutButton
image: "qrc:/graphics/icons/logoutRed.png"
imageScale: 0.8
anchors {
top: foodplanButton.bottom
horizontalCenter: foodplanButton.horizontalCenter
}
width: mainMenu.buttonWidth
height: mainMenu.buttonHeight
}
FancyButton {
id: settingsButton
image: "qrc:/graphics/icons/settingsBlack.png"
imageScale: 0.8
anchors {
top: fannyButton.bottom
horizontalCenter: fannyButton.horizontalCenter
}
width: mainMenu.buttonWidth
height: mainMenu.buttonHeight
}
}
}