Unverified Commit 72d2cce4 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8022 from Aeronavics/Fix_Easter_Egg

Fix EasterEgg overlayed by Flickable item
parents 1af30196 8d89f883
......@@ -37,44 +37,6 @@ Item {
visible: qgcPal.globalTheme === QGCPalette.Light
}
//-------------------------------------------------------------------------
// Easter egg mechanism
MouseArea {
anchors.fill: parent
onClicked: {
_clickCount++
eggTimer.restart()
if (_clickCount == 5) {
if(!QGroundControl.corePlugin.showAdvancedUI) {
advancedModeConfirmation.open()
} else {
QGroundControl.corePlugin.showAdvancedUI = false
}
} else if (_clickCount == 7) {
QGroundControl.corePlugin.showTouchAreas = !QGroundControl.corePlugin.showTouchAreas
}
}
property int _clickCount: 0
Timer {
id: eggTimer
interval: 1000
repeat: false
onTriggered: parent._clickCount = 0
}
MessageDialog {
id: advancedModeConfirmation
title: qsTr("Advanced Mode")
text: QGroundControl.corePlugin.showAdvancedUIMessage
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
QGroundControl.corePlugin.showAdvancedUI = true
advancedModeConfirmation.close()
}
}
}
//-- Setup can be invoked from c++ side
Connections {
......@@ -172,6 +134,39 @@ Item {
buttonRow.clearAllChecks()
checked = true
mainWindow.showFlyView()
// Easter Egg mechanism
_clickCount++
eggTimer.restart()
if (_clickCount == 5) {
if(!QGroundControl.corePlugin.showAdvancedUI) {
advancedModeConfirmation.open()
} else {
QGroundControl.corePlugin.showAdvancedUI = false
}
} else if (_clickCount == 7) {
QGroundControl.corePlugin.showTouchAreas = !QGroundControl.corePlugin.showTouchAreas
}
}
property int _clickCount: 0
Timer {
id: eggTimer
interval: 1000
repeat: false
onTriggered: parent._clickCount = 0
}
MessageDialog {
id: advancedModeConfirmation
title: qsTr("Advanced Mode")
text: QGroundControl.corePlugin.showAdvancedUIMessage
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
QGroundControl.corePlugin.showAdvancedUI = true
advancedModeConfirmation.close()
}
}
}
......
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