mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
97 lines
2.4 KiB
QML
97 lines
2.4 KiB
QML
|
import QtQuick 2.2
|
||
|
|
||
|
Rectangle {
|
||
|
id: wizard
|
||
|
border.color: "#DBDBDB"
|
||
|
border.width: 1
|
||
|
color: "#FFFFFF"
|
||
|
|
||
|
Rectangle {
|
||
|
id: nextButton
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
anchors.right: parent.right
|
||
|
anchors.rightMargin: 50
|
||
|
|
||
|
width: 50; height: 50
|
||
|
radius: 25
|
||
|
color: nextArea.containsMouse ? "#FF4304" : "#FF6C3C"
|
||
|
|
||
|
Image {
|
||
|
anchors.centerIn: parent
|
||
|
anchors.horizontalCenterOffset: 3
|
||
|
source: "qrc:///images/nextPage.png"
|
||
|
}
|
||
|
|
||
|
MouseArea {
|
||
|
id: nextArea
|
||
|
anchors.fill: parent
|
||
|
hoverEnabled: true
|
||
|
onClicked: wizard.switchPage(true)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
property int currentPage: 0
|
||
|
function switchPage(next) {
|
||
|
var pages = new Array()
|
||
|
pages[0] = welcomePage
|
||
|
pages[1] = optionsPage
|
||
|
|
||
|
if(next === false) {
|
||
|
if(currentPage > 0) {
|
||
|
pages[currentPage].opacity = 0
|
||
|
pages[--currentPage].opacity = 1
|
||
|
}
|
||
|
} else {
|
||
|
if(currentPage < pages.length - 1) {
|
||
|
pages[currentPage].opacity = 0
|
||
|
pages[++currentPage].opacity = 1
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
WizardWelcome {
|
||
|
id: welcomePage
|
||
|
anchors.top: parent.top
|
||
|
anchors.bottom: parent.bottom
|
||
|
anchors.right: nextButton.left
|
||
|
anchors.left: prevButton.right
|
||
|
anchors.leftMargin: 50
|
||
|
anchors.rightMargin: 50
|
||
|
}
|
||
|
|
||
|
WizardOptions {
|
||
|
id: optionsPage
|
||
|
anchors.top: parent.top
|
||
|
anchors.bottom: parent.bottom
|
||
|
anchors.right: nextButton.left
|
||
|
anchors.left: prevButton.right
|
||
|
anchors.leftMargin: 50
|
||
|
anchors.rightMargin: 50
|
||
|
}
|
||
|
|
||
|
Rectangle {
|
||
|
id: prevButton
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
anchors.left: parent.left
|
||
|
anchors.leftMargin: 50
|
||
|
visible: parent.currentPage > 0
|
||
|
|
||
|
width: 50; height: 50
|
||
|
radius: 25
|
||
|
color: prevArea.containsMouse ? "#FF4304" : "#FF6C3C"
|
||
|
|
||
|
Image {
|
||
|
anchors.centerIn: parent
|
||
|
anchors.horizontalCenterOffset: -3
|
||
|
source: "qrc:///images/prevPage.png"
|
||
|
}
|
||
|
|
||
|
MouseArea {
|
||
|
id: prevArea
|
||
|
anchors.fill: parent
|
||
|
hoverEnabled: true
|
||
|
onClicked: wizard.switchPage(false)
|
||
|
}
|
||
|
}
|
||
|
}
|