diff --git a/src/confirm.ui b/src/confirm.ui
index e7de7d7..96c1633 100644
--- a/src/confirm.ui
+++ b/src/confirm.ui
@@ -6,8 +6,8 @@
0
0
- 429
- 371
+ 538
+ 458
@@ -23,7 +23,7 @@
-
-
+
true
@@ -67,6 +67,12 @@
-
+
+
+ 0
+ 0
+
+
TextLabel
@@ -93,6 +99,12 @@
-
+
+
+ 0
+ 0
+
+
Miner Textlabel
@@ -101,7 +113,7 @@
-
-
+
0
0
@@ -117,7 +129,7 @@
-
-
+
0
0
@@ -168,7 +180,7 @@
color: red;
- zcashd doesn't seem to have any peers. You might not be connected to the internet, so this Transaction might not work.
+ zcashd doesn't seem to have any peers. You might not be connected to the internet, so this transaction might not work.
true
diff --git a/src/sendtab.cpp b/src/sendtab.cpp
index 5f9ea5b..7be9c5f 100644
--- a/src/sendtab.cpp
+++ b/src/sendtab.cpp
@@ -552,12 +552,24 @@ Tx MainWindow::createTxFromSendPage() {
}
bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
+
+ // Function to split the address to make it easier to read.
+ // Split it into chunks of 4 chars.
auto fnSplitAddressForWrap = [=] (const QString& a) -> QString {
- if (! Settings::isZAddress(a)) return a;
+ QStringList ans;
+ static int splitSize = 8;
+
+ for (int i=0; i < a.length(); i+= splitSize) {
+ ans << a.mid(i, splitSize);
+ }
- auto half = a.length() / 2;
- auto splitted = a.left(half) + "\n" + a.right(a.length() - half);
- return splitted;
+ return ans.join(" ");
+
+ // if (! Settings::isZAddress(a)) return a;
+
+ // auto half = a.length() / 2;
+ // auto splitted = a.left(half) + "\n" + a.right(a.length() - half);
+ // return splitted;
};
// Update the recurring info with the latest Tx
@@ -570,6 +582,8 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
Ui_confirm confirm;
confirm.setupUi(&d);
+ const QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
+
// Remove all existing address/amt qlabels on the confirm dialog.
int totalConfirmAddrItems = confirm.sendToAddrs->children().size();
for (int i = 0; i < totalConfirmAddrItems / 3; i++) {
@@ -605,6 +619,7 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
Addr->setObjectName(QString("Addr") % QString::number(i + 1));
Addr->setWordWrap(true);
Addr->setText(fnSplitAddressForWrap(toAddr.addr));
+ Addr->setFont(fixedFont);
confirm.gridLayout->addWidget(Addr, row, 0, 1, 1);
// Amount (ZEC)
@@ -696,6 +711,7 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
// And FromAddress in the confirm dialog
confirm.sendFrom->setText(fnSplitAddressForWrap(tx.fromAddr));
+ confirm.sendFrom->setFont(fixedFont);
QString tooltip = tr("Current balance : ") +
Settings::getZECUSDDisplayFormat(rpc->getAllBalances()->value(tx.fromAddr));
tooltip += "\n" + tr("Balance after this Tx: ") +