Skip to content
Open
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
4 changes: 4 additions & 0 deletions qml/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ int QmlGuiMain(int argc, char* argv[])
engine.rootContext()->setContextProperty("banListModel", &ban_list_model);
#ifdef ENABLE_WALLET
WalletListModel wallet_list_model{*node, nullptr};
QObject::connect(&wallet_controller, &WalletQmlController::openWalletsChanged,
&wallet_list_model, &WalletListModel::setOpenWalletNames);
QObject::connect(&wallet_controller, &WalletQmlController::walletDisplayNamesChanged,
&wallet_list_model, &WalletListModel::refreshDisplayNames);
engine.rootContext()->setContextProperty("walletController", &wallet_controller);
engine.rootContext()->setContextProperty("walletListModel", &wallet_list_model);
#endif
Expand Down
11 changes: 11 additions & 0 deletions qml/bitcoin_qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<file>components/BlockCounter.qml</file>
<file>components/ConnectionOptions.qml</file>
<file>components/ConnectionSettings.qml</file>
<file>components/MempoolInformationRows.qml</file>
<file>components/DeveloperOptions.qml</file>
<file>components/ExternalPopup.qml</file>
<file>components/FeeSelection.qml</file>
Expand All @@ -23,12 +24,15 @@
<file>components/ThemeSettings.qml</file>
<file>components/TotalBytesIndicator.qml</file>
<file>components/Tooltip.qml</file>
<file>components/WalletMigrationPopup.qml</file>
<file>components/WalletPassphrasePopup.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/EditableKeyValueRow.qml</file>
<file>controls/ExternalLink.qml</file>
<file>controls/FocusBorder.qml</file>
<file>controls/Header.qml</file>
Expand All @@ -52,6 +56,7 @@
<file>controls/ProgressIndicator.qml</file>
<file>controls/QRImage.qml</file>
<file>controls/qmldir</file>
<file>controls/ReceiveOptionsPopup.qml</file>
<file>controls/SendOptionsPopup.qml</file>
<file>controls/Setting.qml</file>
<file>controls/Skeleton.qml</file>
Expand All @@ -64,6 +69,7 @@
<file>pages/main.qml</file>
<file>pages/node/BannedPeers.qml</file>
<file>pages/node/NetworkTraffic.qml</file>
<file>pages/node/MempoolInformationSettings.qml</file>
<file>pages/node/NodeRunner.qml</file>
<file>pages/node/NodeSettings.qml</file>
<file>pages/node/Peers.qml</file>
Expand Down Expand Up @@ -101,7 +107,11 @@
<file>pages/wallet/Send.qml</file>
<file>pages/wallet/SendResult.qml</file>
<file>pages/wallet/SendReview.qml</file>
<file>pages/wallet/SignVerifyMessage.qml</file>
<file>pages/wallet/WalletBadge.qml</file>
<file>pages/wallet/WalletDelete.qml</file>
<file>pages/wallet/WalletPasswordSettings.qml</file>
<file>pages/wallet/WalletSettings.qml</file>
<file>pages/wallet/WalletSelect.qml</file>
</qresource>
<qresource prefix="/icons">
Expand All @@ -127,6 +137,7 @@
<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="edit">res/icons/edit.png</file>
<file alias="error">res/icons/error.png</file>
<file alias="export">res/icons/export.png</file>
<file alias="file">res/icons/file.png</file>
Expand Down
3 changes: 3 additions & 0 deletions qml/components/BitcoinAddressInputField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ColumnLayout {
property string errorText: ""
property string labelText: qsTr("Send to")
property bool enabled: true
property alias text: addressInput.text
property string inputObjectName: ""

signal editingFinished()

Expand All @@ -40,6 +42,7 @@ ColumnLayout {

TextArea {
id: addressInput
objectName: root.inputObjectName
anchors.left: label.right
anchors.right: parent.right
anchors.top: parent.top
Expand Down
96 changes: 96 additions & 0 deletions qml/components/MempoolInformationRows.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Copyright (c) 2026 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 QtQuick 2.15 as QtQuickBase

import "../controls"

ColumnLayout {
id: root
spacing: 4

function formatMegabytes(valueMb) {
const rounded = Math.round(valueMb)
const decimals = Math.abs(valueMb - rounded) < 0.005 ? 0 : 2
return Number(valueMb).toLocaleString(Qt.locale(), 'f', decimals) + " MB"
}

Setting {
objectName: "mempoolTransactionsRow"
Layout.fillWidth: true
state: "DISABLED"
disabledStateColor: Theme.color.neutral9
header: qsTr("Transactions")
actionItem: CoreText {
text: Number(nodeModel.mempoolTransactionCount).toLocaleString(Qt.locale(), 'f', 0)
color: Theme.color.neutral7
font.pixelSize: 15
fontStyleName: "Regular"
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
wrapMode: Text.NoWrap
}
}

Separator { Layout.fillWidth: true }

Setting {
objectName: "mempoolMemoryUsedRow"
Layout.fillWidth: true
state: "DISABLED"
disabledStateColor: Theme.color.neutral9
header: qsTr("Memory used")
actionItem: CoreText {
text: qsTr("%1 / %2")
.arg(root.formatMegabytes(nodeModel.mempoolUsageMB))
.arg(root.formatMegabytes(nodeModel.mempoolMaxUsageMB))
color: Theme.color.neutral7
font.pixelSize: 15
fontStyleName: "Regular"
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
wrapMode: Text.NoWrap
}
}

Separator { Layout.fillWidth: true }

Setting {
id: mempoolLimitSetting
objectName: "mempoolSizeLimitRow"
Layout.fillWidth: true
header: qsTr("Mempool size limit")
description: qsTr("Applies after restart")
descriptionColor: Theme.color.neutral7
errorText: qsTr("This is not a valid mempool size. Please choose a value between %1 and %2 MB.")
.arg(optionsModel.minMaxMempoolSizeMB)
.arg(optionsModel.maxMaxMempoolSizeMB)
showErrorText: false
actionItem: ValueInput {
parentState: mempoolLimitSetting.state
description: optionsModel.maxMempoolSizeMB
descriptionSize: 15
validator: QtQuickBase.IntValidator {
bottom: optionsModel.minMaxMempoolSizeMB
top: optionsModel.maxMaxMempoolSizeMB
}
onEditingFinished: {
if (checkValidity(optionsModel.minMaxMempoolSizeMB, optionsModel.maxMaxMempoolSizeMB, parseInt(text))) {
optionsModel.maxMempoolSizeMB = parseInt(text)
mempoolLimitSetting.forceActiveFocus()
mempoolLimitSetting.showErrorText = false
} else {
mempoolLimitSetting.showErrorText = true
}
}
}
onClicked: {
loadedItem.filled = true
loadedItem.forceActiveFocus()
}
}
}
107 changes: 107 additions & 0 deletions qml/components/WalletMigrationPopup.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Copyright (c) 2026 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

property string popupObjectName: ""
property string titleText: qsTr("Wallet update required")
property string descriptionText: ""
property string confirmText: qsTr("Update wallet")
property string busyConfirmText: qsTr("Updating...")
property string errorText: ""
property string errorTextObjectName: ""
property string cancelButtonObjectName: ""
property string confirmButtonObjectName: ""
property bool busy: false

signal confirmed()

objectName: popupObjectName
modal: true
padding: 0
implicitWidth: 420
implicitHeight: columnLayout.implicitHeight
anchors.centerIn: parent

background: Rectangle {
color: Theme.color.background
radius: 10
border.color: Theme.color.neutral4
border.width: 1
}

ColumnLayout {
id: columnLayout
anchors.fill: parent
spacing: 0

CoreText {
Layout.fillWidth: true
Layout.preferredHeight: 56
text: root.titleText
bold: true
font.pixelSize: 24
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}

Separator {
Layout.fillWidth: true
}

Header {
Layout.fillWidth: true
Layout.margins: 20
Layout.topMargin: 20
header: root.descriptionText
headerBold: false
headerSize: 16
}

CoreText {
objectName: root.errorTextObjectName
Layout.fillWidth: true
Layout.leftMargin: 20
Layout.rightMargin: 20
Layout.topMargin: 4
visible: text.length > 0
text: root.errorText
color: Theme.color.red
font.pixelSize: 15
wrapMode: Text.WordWrap
}

RowLayout {
Layout.fillWidth: true
Layout.margins: 20
Layout.topMargin: 20
spacing: 15

OutlineButton {
objectName: root.cancelButtonObjectName
Layout.fillWidth: true
Layout.minimumWidth: 120
enabled: !root.busy
text: qsTr("Cancel")
onClicked: root.close()
}

ContinueButton {
objectName: root.confirmButtonObjectName
Layout.fillWidth: true
Layout.minimumWidth: 120
enabled: !root.busy
text: root.busy ? root.busyConfirmText : root.confirmText
onClicked: root.confirmed()
}
}
}
}
Loading