diff --git a/src/ReceiveWidget.cpp b/src/ReceiveWidget.cpp index 01219c0e..23b3674c 100644 --- a/src/ReceiveWidget.cpp +++ b/src/ReceiveWidget.cpp @@ -12,6 +12,7 @@ #include "utils/config.h" #include "utils/Icons.h" #include "utils/Utils.h" +#include "widgets/SceneWidget.h" ReceiveWidget::ReceiveWidget(Wallet *wallet, QWidget *parent) : QWidget(parent) @@ -20,6 +21,13 @@ ReceiveWidget::ReceiveWidget(Wallet *wallet, QWidget *parent) { ui->setupUi(this); + // wowlet: ambient scene as a short banner under the address table. A layout + // item, never an overlay over the table. + auto *scene = new SceneWidget(this); + scene->setMinimumHeight(110); + scene->setMaximumHeight(130); + ui->verticalLayout->addWidget(scene); + m_model = m_wallet->subaddressModel(); m_proxyModel = new SubaddressProxyModel(this, m_wallet->subaddress()); m_proxyModel->setSourceModel(m_model); diff --git a/src/SendWidget.cpp b/src/SendWidget.cpp index dff189e6..c51b6bc2 100644 --- a/src/SendWidget.cpp +++ b/src/SendWidget.cpp @@ -11,6 +11,7 @@ #include "Icons.h" #include "libwalletqt/Wallet.h" #include "libwalletqt/WalletManager.h" +#include "widgets/SceneWidget.h" #if defined(WITH_SCANNER) #include "wizard/offline_tx_signing/OfflineTxSigningWizard.h" @@ -25,6 +26,14 @@ SendWidget::SendWidget(Wallet *wallet, QWidget *parent) { ui->setupUi(this); + // wowlet: the form only needs the top of the tab — give the rest of it to + // the ambient scene. A layout item under the form, never an overlay: the + // send form itself stays untouched. + auto *scene = new SceneWidget(this); + scene->setMinimumHeight(160); + scene->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + ui->verticalLayoutOuter->addWidget(scene, 1); + QString amount_rx = R"(^\d{0,8}[\.,]\d{0,12}|(all)$)"; QRegularExpression rx; rx.setPattern(amount_rx); diff --git a/src/SendWidget.ui b/src/SendWidget.ui index cdb2e294..ff307275 100644 --- a/src/SendWidget.ui +++ b/src/SendWidget.ui @@ -11,7 +11,7 @@ - + 0 0 @@ -19,7 +19,24 @@ Form - + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + QLayout::SizeConstraint::SetMinimumSize @@ -274,6 +291,8 @@ + +