From 38472c895cb77b76910af91cd653c4012f1fd991 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 17 Jan 2023 16:52:50 +0100 Subject: [PATCH] qml: NetworkOverview removed from menu, now triggered by onchain and lightning status icon --- electrum/gui/qml/components/NetworkOverview.qml | 2 ++ electrum/gui/qml/components/WalletMainView.qml | 8 -------- electrum/gui/qml/components/main.qml | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/electrum/gui/qml/components/NetworkOverview.qml b/electrum/gui/qml/components/NetworkOverview.qml index f668b579f..bcf78f52e 100644 --- a/electrum/gui/qml/components/NetworkOverview.qml +++ b/electrum/gui/qml/components/NetworkOverview.qml @@ -7,6 +7,8 @@ import "controls" Pane { id: root + objectName: 'NetworkOverview' + padding: 0 ColumnLayout { diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index 39a60936d..6f21f2ca7 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -66,14 +66,6 @@ Item { icon.source: '../../icons/tab_addresses.png' } } - MenuItem { - icon.color: 'transparent' - action: Action { - text: qsTr('Network'); - onTriggered: menu.openPage(Qt.resolvedUrl('NetworkOverview.qml')) - icon.source: '../../icons/network.png' - } - } MenuItem { icon.color: 'transparent' action: Action { diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index 8b7cbb8a3..b03611c21 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -103,9 +103,24 @@ ApplicationWindow LightningNetworkStatusIndicator { visible: Daemon.currentWallet.isLightning + MouseArea { + anchors.fill: parent + onClicked: { + if (stack.currentItem.objectName != 'NetworkOverview') + stack.push(Qt.resolvedUrl('NetworkOverview.qml')) + } + } } - OnchainNetworkStatusIndicator { } + OnchainNetworkStatusIndicator { + MouseArea { + anchors.fill: parent + onClicked: { + if (stack.currentItem.objectName != 'NetworkOverview') + stack.push(Qt.resolvedUrl('NetworkOverview.qml')) + } + } + } Rectangle { color: 'transparent'