Skip to content

Add Multiple Recipients option to the Send form #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ QT_MOC_CPP = \
qml/controls/moc_linegraph.cpp \
qml/models/moc_activitylistmodel.cpp \
qml/models/moc_chainmodel.cpp \
qml/models/moc_coinslistmodel.cpp \
qml/models/moc_networktraffictower.cpp \
qml/models/moc_nodemodel.cpp \
qml/models/moc_options_model.cpp \
qml/models/moc_peerdetailsmodel.cpp \
qml/models/moc_peerlistsortproxy.cpp \
qml/models/moc_peerlistsortproxy.cpp \\
qml/models/moc_sendrecipient.cpp \
qml/models/moc_sendrecipientslistmodel.cpp \
qml/models/moc_transaction.cpp \
qml/models/moc_sendrecipient.cpp \
qml/models/moc_walletlistmodel.cpp \
Expand Down Expand Up @@ -129,13 +132,15 @@ BITCOIN_QT_H = \
qml/controls/linegraph.h \
qml/models/activitylistmodel.h \
qml/models/chainmodel.h \
qml/models/coinslistmodel.h \
qml/models/networktraffictower.h \
qml/models/nodemodel.h \
qml/models/options_model.h \
qml/models/peerdetailsmodel.h \
qml/models/peerlistsortproxy.h \
qml/models/transaction.h \
qml/models/sendrecipient.h \
qml/models/sendrecipientslistmodel.h \
qml/models/walletlistmodel.h \
qml/models/walletqmlmodel.h \
qml/models/walletqmlmodeltransaction.h \
Expand Down Expand Up @@ -328,13 +333,15 @@ BITCOIN_QML_BASE_CPP = \
qml/controls/linegraph.cpp \
qml/models/activitylistmodel.cpp \
qml/models/chainmodel.cpp \
qml/models/coinslistmodel.cpp \
qml/models/networktraffictower.cpp \
qml/models/nodemodel.cpp \
qml/models/options_model.cpp \
qml/models/peerdetailsmodel.cpp \
qml/models/peerlistsortproxy.cpp \
qml/models/transaction.cpp \
qml/models/sendrecipient.cpp \
qml/models/sendrecipientslistmodel.cpp \
qml/models/walletlistmodel.cpp \
qml/models/walletqmlmodel.cpp \
qml/models/walletqmlmodeltransaction.cpp \
Expand All @@ -361,13 +368,15 @@ QML_RES_ICONS = \
qml/res/icons/copy.png \
qml/res/icons/coinbase.png \
qml/res/icons/cross.png \
qml/res/icons/ellipsis.png \
qml/res/icons/error.png \
qml/res/icons/export.png \
qml/res/icons/flip-vertical.png \
qml/res/icons/gear.png \
qml/res/icons/gear-outline.png \
qml/res/icons/hidden.png \
qml/res/icons/info.png \
qml/res/icons/lock.png \
qml/res/icons/minus.png \
qml/res/icons/network-dark.png \
qml/res/icons/network-light.png \
Expand Down Expand Up @@ -395,9 +404,10 @@ QML_RES_QML = \
qml/components/ConnectionSettings.qml \
qml/components/DeveloperOptions.qml \
qml/components/ExternalPopup.qml \
qml/components/PeersIndicator.qml \
qml/components/NetworkTrafficGraph.qml \
qml/components/NetworkIndicator.qml \
qml/components/OptionPopup.qml \
qml/components/PeersIndicator.qml \
qml/components/ProxySettings.qml \
qml/components/Separator.qml \
qml/components/StorageLocations.qml \
Expand All @@ -409,8 +419,11 @@ QML_RES_QML = \
qml/controls/AddWalletButton.qml \
qml/controls/CaretRightIcon.qml \
qml/controls/ContinueButton.qml \
qml/controls/CoreCheckBox.qml \
qml/controls/CoreText.qml \
qml/controls/CoreTextField.qml \
qml/controls/EllipsisMenuButton.qml \
qml/controls/EllipsisMenuToggleItem.qml \
qml/controls/ExternalLink.qml \
qml/controls/FocusBorder.qml \
qml/controls/Header.qml \
Expand All @@ -419,6 +432,7 @@ QML_RES_QML = \
qml/controls/IPAddressValueInput.qml \
qml/controls/KeyValueRow.qml \
qml/controls/LabeledTextInput.qml \
qml/controls/LabeledCoinControlButton.qml \
qml/controls/NavButton.qml \
qml/controls/NavigationBar.qml \
qml/controls/NavigationBar2.qml \
Expand All @@ -431,6 +445,7 @@ QML_RES_QML = \
qml/controls/ProgressIndicator.qml \
qml/controls/qmldir \
qml/controls/Setting.qml \
qml/controls/SendOptionsPopup.qml \
qml/controls/TextButton.qml \
qml/controls/Theme.qml \
qml/controls/ToggleButton.qml \
Expand Down Expand Up @@ -461,6 +476,7 @@ QML_RES_QML = \
qml/pages/settings/SettingsTheme.qml \
qml/pages/wallet/Activity.qml \
qml/pages/wallet/ActivityDetails.qml \
qml/pages/wallet/CoinSelection.qml \
qml/pages/wallet/CreateBackup.qml \
qml/pages/wallet/CreateConfirm.qml \
qml/pages/wallet/CreateIntro.qml \
Expand Down
13 changes: 11 additions & 2 deletions src/qml/bitcoin_qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<file>components/BlockClock.qml</file>
<file>components/BlockClockDisplayMode.qml</file>
<file>components/BlockCounter.qml</file>
<file>controls/CaretRightIcon.qml</file>
<file>components/ConnectionOptions.qml</file>
<file>components/ConnectionSettings.qml</file>
<file>components/PeersIndicator.qml</file>
<file>components/DeveloperOptions.qml</file>
<file>components/ExternalPopup.qml</file>
<file>components/NetworkTrafficGraph.qml</file>
<file>components/NetworkIndicator.qml</file>
<file>components/OptionPopup.qml</file>
<file>components/PeersIndicator.qml</file>
<file>components/ProxySettings.qml</file>
<file>components/StorageLocations.qml</file>
<file>components/Separator.qml</file>
Expand All @@ -21,7 +21,9 @@
<file>components/TotalBytesIndicator.qml</file>
<file>components/Tooltip.qml</file>
<file>controls/AddWalletButton.qml</file>
<file>controls/CaretRightIcon.qml</file>
<file>controls/ContinueButton.qml</file>
<file>controls/CoreCheckBox.qml</file>
<file>controls/CoreText.qml</file>
<file>controls/CoreTextField.qml</file>
<file>controls/ExternalLink.qml</file>
Expand All @@ -32,6 +34,9 @@
<file>controls/IPAddressValueInput.qml</file>
<file>controls/KeyValueRow.qml</file>
<file>controls/LabeledTextInput.qml</file>
<file>controls/LabeledCoinControlButton.qml</file>
<file>controls/EllipsisMenuButton.qml</file>
<file>controls/EllipsisMenuToggleItem.qml</file>
<file>controls/NavButton.qml</file>
<file>controls/NavigationBar.qml</file>
<file>controls/NavigationBar2.qml</file>
Expand All @@ -43,6 +48,7 @@
<file>controls/PageStack.qml</file>
<file>controls/ProgressIndicator.qml</file>
<file>controls/qmldir</file>
<file>controls/SendOptionsPopup.qml</file>
<file>controls/Setting.qml</file>
<file>controls/TextButton.qml</file>
<file>controls/Theme.qml</file>
Expand Down Expand Up @@ -74,6 +80,7 @@
<file>pages/settings/SettingsTheme.qml</file>
<file>pages/wallet/Activity.qml</file>
<file>pages/wallet/ActivityDetails.qml</file>
<file>pages/wallet/CoinSelection.qml</file>
<file>pages/wallet/CreateBackup.qml</file>
<file>pages/wallet/CreateConfirm.qml</file>
<file>pages/wallet/CreateIntro.qml</file>
Expand Down Expand Up @@ -104,13 +111,15 @@
<file alias="copy">res/icons/copy.png</file>
<file alias="coinbase">res/icons/coinbase.png</file>
<file alias="cross">res/icons/cross.png</file>
<file alias="ellipsis">res/icons/ellipsis.png</file>
<file alias="error">res/icons/error.png</file>
<file alias="export">res/icons/export.png</file>
<file alias="flip-vertical">res/icons/flip-vertical.png</file>
<file alias="gear">res/icons/gear.png</file>
<file alias="gear-outline">res/icons/gear-outline.png</file>
<file alias="hidden">res/icons/hidden.png</file>
<file alias="info">res/icons/info.png</file>
<file alias="lock">res/icons/lock.png</file>
<file alias="minus">res/icons/minus.png</file>
<file alias="network-dark">res/icons/network-dark.png</file>
<file alias="network-light">res/icons/network-light.png</file>
Expand Down
24 changes: 24 additions & 0 deletions src/qml/components/OptionPopup.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) 2025 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import "../controls"

Popup {
id: root

background: Item {
anchors.fill: parent
Rectangle {
color: Theme.color.neutral0
border.color: Theme.color.neutral4
radius: 5
border.width: 1
anchors.fill: parent
}
}
}
27 changes: 27 additions & 0 deletions src/qml/controls/CoreCheckBox.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) 2025 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15

AbstractButton {
id: root
implicitWidth: 20
implicitHeight: 20

property color borderColor: Theme.color.neutral9
property color fillColor: Theme.color.neutral9

background: null

checkable: true
hoverEnabled: AppMode.isDesktop

contentItem: Rectangle {
radius: 3
border.color: root.checked ? root.fillColor : root.borderColor
border.width: 1
color: root.checked ? root.fillColor : "transparent"
}
}
48 changes: 48 additions & 0 deletions src/qml/controls/EllipsisMenuButton.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright (c) 2025 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import org.bitcoincore.qt 1.0

Button {
id: root

property color hoverColor: Theme.color.orange
property color activeColor: Theme.color.orange

hoverEnabled: AppMode.isDesktop
implicitHeight: 35
implicitWidth: 35

MouseArea {
anchors.fill: parent
enabled: false
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}

background: null

contentItem: Icon {
id: ellipsisIcon
anchors.fill: parent
source: "image://images/ellipsis"
color: Theme.color.neutral9
size: 35
}

states: [
State {
name: "CHECKED"; when: root.checked
PropertyChanges { target: ellipsisIcon; color: activeColor }
},
State {
name: "HOVER"; when: root.hovered
PropertyChanges { target: ellipsisIcon; color: hoverColor }
}
]
}
74 changes: 74 additions & 0 deletions src/qml/controls/EllipsisMenuToggleItem.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright (c) 2025 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import org.bitcoincore.qt 1.0

Button {
property int bgRadius: 5
property color bgDefaultColor: "transparent"
property color bgHoverColor: Theme.color.neutral2
property color textColor: Theme.color.neutral7
property color textHoverColor: Theme.color.neutral9
property color textActiveColor: Theme.color.neutral7

id: root
checkable: true
checked: optionSwitch.checked
hoverEnabled: AppMode.isDesktop

implicitWidth: 280

MouseArea {
anchors.fill: parent
enabled: false
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}

onClicked: {
optionSwitch.checked = !optionSwitch.checked
}

contentItem: RowLayout {
spacing: 7
anchors.fill: parent
anchors.centerIn: parent
anchors.margins: 10
CoreText {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: 15
text: root.text
}
OptionSwitch {
id: optionSwitch
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 40
Layout.preferredHeight: 24
checked: root.checked
}
}

background: Rectangle {
id: bg
color: root.bgDefaultColor
radius: root.bgRadius

Behavior on color {
ColorAnimation { duration: 150 }
}
}

states: [
State {
name: "HOVER"; when: root.hovered
PropertyChanges { target: bg; color: root.bgHoverColor }
PropertyChanges { target: buttonText; color: root.textHoverColor }
}
]
}
Loading
Loading