Unverified Commit b8b13783 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6495 from DonLakeFlyer/MissionSyncProgress

Plan: Large progress bar in Outdoor theme
parents 36186141 c2b56a51
......@@ -116,6 +116,7 @@ Rectangle {
if (_controllerProgressPct === 1) {
missionStats.visible = false
uploadCompleteText.visible = true
progressBar.visible = false
resetProgressTimer.start()
} else if (_controllerProgressPct > 0) {
progressBar.visible = true
......@@ -128,20 +129,9 @@ Rectangle {
onTriggered: {
missionStats.visible = true
uploadCompleteText.visible = false
progressBar.visible = false
}
}
Rectangle {
id: progressBar
anchors.left: parent.left
anchors.bottom: parent.bottom
height: 4
width: _controllerProgressPct * parent.width
color: qgcPal.colorGreen
visible: false
}
QGCLabel {
id: uploadCompleteText
anchors.top: parent.top
......@@ -313,5 +303,72 @@ Rectangle {
duration: 2000
}
}
// Small mission download progress bar
Rectangle {
id: progressBar
anchors.left: parent.left
anchors.bottom: parent.bottom
height: 4
width: _controllerProgressPct * parent.width
color: qgcPal.colorGreen
visible: false
}
/*
Rectangle {
anchors.bottom: parent.bottom
height: toolBar.height * 0.05
width: _activeVehicle ? _activeVehicle.parameterManager.loadProgress * parent.width : 0
color: qgcPal.colorGreen
visible: !largeProgressBar.visible
}
*/
// Large mission download progress bar
Rectangle {
id: largeProgressBar
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
height: parent.height
color: qgcPal.window
visible: _showLargeProgress
property bool _userHide: false
property bool _showLargeProgress: progressBar.visible && !_userHide && qgcPal.globalTheme === QGCPalette.Light
Connections {
target: QGroundControl.multiVehicleManager
onActiveVehicleChanged: largeProgressBar._userHide = false
}
Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: _controllerProgressPct * parent.width
color: qgcPal.colorGreen
}
QGCLabel {
anchors.centerIn: parent
text: qsTr("Syncing Mission")
font.pointSize: ScreenTools.largeFontPointSize
}
QGCLabel {
anchors.margins: _margin
anchors.right: parent.right
anchors.bottom: parent.bottom
text: qsTr("Click anywhere to hide")
property real _margin: ScreenTools.defaultFontPixelWidth / 2
}
MouseArea {
anchors.fill: parent
onClicked: largeProgressBar._userHide = true
}
}
}
......@@ -225,7 +225,6 @@ Rectangle {
color: qgcPal.window
visible: _showLargeProgress
property bool _showFullHeight: false
property bool _initialDownloadComplete: _activeVehicle ? _activeVehicle.parameterManager.parametersReady : true
property bool _userHide: false
property bool _showLargeProgress: !_initialDownloadComplete && !_userHide && qgcPal.globalTheme === QGCPalette.Light
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment