From aea6fdca0cff7e223a0b7ddd027981f413a08399 Mon Sep 17 00:00:00 2001 From: consti10 Date: Mon, 6 Nov 2023 13:31:52 +0100 Subject: [PATCH] for now, just do not show the reboot shutdown actions --- qml/ui/configpopup/status/FooterRebootShutdownWarning.qml | 7 +++++-- qml/ui/configpopup/status/StatusCardsColumn.qml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qml/ui/configpopup/status/FooterRebootShutdownWarning.qml b/qml/ui/configpopup/status/FooterRebootShutdownWarning.qml index 2d26f2e73..897803c6a 100644 --- a/qml/ui/configpopup/status/FooterRebootShutdownWarning.qml +++ b/qml/ui/configpopup/status/FooterRebootShutdownWarning.qml @@ -14,6 +14,9 @@ Item { anchors.fill: parent property int m_type: 0 // 0 = ground, 1= air, 2=FC + + property bool m_supports_reboot_actions: true + function get_show_power_actions(){ if(m_type==0){ return _ohdSystemGround.is_alive @@ -48,7 +51,7 @@ Item { anchors.fill: parent //visible: get_show_power_actions() Button{ - visible: get_show_power_actions() + visible: get_show_power_actions() && m_supports_reboot_actions Layout.alignment: Qt.AlignLeft Layout.leftMargin: 10 text: qsTr("REBOOT") @@ -57,7 +60,7 @@ Item { } } Button{ - visible: get_show_power_actions() + visible: get_show_power_actions() && m_supports_reboot_actions Layout.alignment: Qt.AlignRight Layout.rightMargin: 10 text: qsTr("SHUTDOWN") diff --git a/qml/ui/configpopup/status/StatusCardsColumn.qml b/qml/ui/configpopup/status/StatusCardsColumn.qml index 3513dbda2..a9b110cfc 100644 --- a/qml/ui/configpopup/status/StatusCardsColumn.qml +++ b/qml/ui/configpopup/status/StatusCardsColumn.qml @@ -69,6 +69,7 @@ RowLayout{ hasFooter: true cardFooter: FooterRebootShutdownWarning{ + m_supports_reboot_actions: false m_type: 2 } }