From f0d44d06817dcd78d948e754704bf8816cd7505e Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 16 Mar 2023 12:09:57 +0100 Subject: [PATCH] qml: expand clickable area to full toolbar height and a bit more padding for right-side menu --- electrum/gui/qml/components/main.qml | 82 +++++++++++++++------------- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index adc334025..dbf6ec4b9 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -134,7 +134,6 @@ ApplicationWindow font.pixelSize: constants.fontSizeMedium font.bold: true MouseArea { - // height: toolbarTopLayout.height anchors.fill: parent onClicked: { stack.getRoot().menu.open() @@ -144,48 +143,57 @@ ApplicationWindow } Item { - visible: Network.isTestNet - width: column.width - height: column.height + implicitHeight: 48 + implicitWidth: statusIconsLayout.width - ColumnLayout { - id: column - spacing: 0 - Image { - Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: constants.iconSizeSmall - Layout.preferredHeight: constants.iconSizeSmall - source: "../../icons/info.png" - } - - Label { - id: networkNameLabel - text: Network.networkName - color: Material.accentColor - font.pixelSize: constants.fontSizeXSmall - } - } - } - - Image { - Layout.preferredWidth: constants.iconSizeSmall - Layout.preferredHeight: constants.iconSizeSmall - visible: Daemon.currentWallet && Daemon.currentWallet.isWatchOnly - source: '../../icons/eye1.png' - scale: 1.5 - } - - LightningNetworkStatusIndicator { MouseArea { anchors.fill: parent onClicked: openAppMenu() } - } - OnchainNetworkStatusIndicator { - MouseArea { - anchors.fill: parent - onClicked: openAppMenu() + RowLayout { + id: statusIconsLayout + anchors.verticalCenter: parent.verticalCenter + + Item { + Layout.preferredWidth: constants.paddingLarge + Layout.preferredHeight: 1 + } + + Item { + visible: Network.isTestNet + width: column.width + height: column.height + + ColumnLayout { + id: column + spacing: 0 + Image { + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: constants.iconSizeSmall + Layout.preferredHeight: constants.iconSizeSmall + source: "../../icons/info.png" + } + + Label { + id: networkNameLabel + text: Network.networkName + color: Material.accentColor + font.pixelSize: constants.fontSizeXSmall + } + } + } + + Image { + Layout.preferredWidth: constants.iconSizeSmall + Layout.preferredHeight: constants.iconSizeSmall + visible: Daemon.currentWallet && Daemon.currentWallet.isWatchOnly + source: '../../icons/eye1.png' + scale: 1.5 + } + + LightningNetworkStatusIndicator {} + OnchainNetworkStatusIndicator {} } } }