From ff8a04952552a71feb3776bd7d76ecf4a0f7e2f0 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 17 Jan 2023 16:32:40 +0100 Subject: [PATCH] qml swap send and receive buttons, move menu button to bottom button group --- .../gui/qml/components/WalletMainView.qml | 26 +++++++++++++++---- electrum/gui/qml/components/main.qml | 19 +++++--------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index a66cdb64d..39a60936d 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -160,11 +160,13 @@ Item { spacing: 0 FlatButton { - Layout.fillWidth: true - Layout.preferredWidth: 1 - icon.source: '../../icons/tab_send.png' - text: qsTr('Send') - onClicked: openSendDialog() + Layout.fillWidth: false + Layout.preferredWidth: implicitHeight + text: qsTr('≡') + onClicked: { + mainView.menu.open() + mainView.menu.y = mainView.height - mainView.menu.height + } } Rectangle { Layout.fillWidth: false @@ -183,6 +185,20 @@ Item { dialog.open() } } + Rectangle { + Layout.fillWidth: false + Layout.preferredWidth: 2 + Layout.preferredHeight: parent.height * 2/3 + Layout.alignment: Qt.AlignVCenter + color: constants.darkerBackground + } + FlatButton { + Layout.fillWidth: true + Layout.preferredWidth: 1 + icon.source: '../../icons/tab_send.png' + text: qsTr('Send') + onClicked: openSendDialog() + } } } diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index e274d1c45..8b7cbb8a3 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -36,32 +36,25 @@ ApplicationWindow ColumnLayout { spacing: 0 width: parent.width + height: toolbar.height RowLayout { id: toolbarTopLayout Layout.fillWidth: true Layout.rightMargin: constants.paddingMedium + Layout.alignment: Qt.AlignVCenter - ToolButton { - id: menuButton - enabled: stack.currentItem && stack.currentItem.menu - ? stack.currentItem.menu.count > 0 - : false - - text: enabled ? qsTr("≡") : '' - font.pixelSize: constants.fontSizeXLarge - onClicked: { - stack.currentItem.menu.open() - stack.currentItem.menu.y = toolbarTopLayout.height - } + Item { + Layout.preferredWidth: constants.paddingXLarge + Layout.preferredHeight: 1 } Label { Layout.preferredHeight: Math.max(implicitHeight, toolbarTopLayout.height) text: stack.currentItem.title elide: Label.ElideRight - horizontalAlignment: Qt.AlignHCenter + // horizontalAlignment: Qt.AlignHCenter verticalAlignment: Qt.AlignVCenter Layout.fillWidth: true font.pixelSize: constants.fontSizeMedium