From 5d0e14370dfc4b3c6b84ac3e116a02691191c5aa Mon Sep 17 00:00:00 2001 From: Sami Ahmed Date: Wed, 8 Jul 2026 18:00:35 -0700 Subject: [PATCH] release: v6.1.7 (bold Total + distinct Confirming color) Three user-visible changes since v6.1.6: 1. Total label font-weight 75 -> 900 (full bold). v6.1.6 used 'font: 12pt bold' which Qt maps to weight 75, indistinguishable from the other bold balance labels. Now 'font: 900 12pt'. 2. Transactions amount column Confirming tier color changed from #C5EBC9 (pale mint) to #4A8C5E (mid green). The pale mint was too close to the bright #7CDB8A Confirmed green on the dark background and read as the same color to the user. Mid green sits clearly between grey (#61280E Unconfirmed) and bright green (#7CDB8A Confirmed) so the three tiers are visually distinct. 3. Both amount paint sites (Transactions tab + Overview recent-5) now read confirmation depth via a new DepthRole on TransactionTableModel instead of going through the TransactionStatus enum. The rule fires on every block increment, not only on enum state transitions. Internal: added DepthRole to TransactionTableModel::ColumnRole enum. transactiontablemodel.cpp::data() handles the new role. overviewpage.cpp::TxViewDelegate::paint() queries DepthRole. Packaging metadata, CHANGELOG, RPM %changelog updated to 6.1.7. --- CHANGELOG.md | 16 ++++++++-- packaging/rpm/triangles.spec | 7 ++++- src/qt/guiconstants.h | 6 ++-- src/qt/overviewpage.cpp | 11 +++---- src/qt/transactiontablemodel.cpp | 50 ++++++++++++++++++-------------- src/qt/transactiontablemodel.h | 4 ++- 6 files changed, 61 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c953b4..fda2216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `font-weight: 900` (full bold) instead of Qt's default bold (75, medium-bold). On builds where the font has a true heavy variant, the Total now visually pops as the headline number against the - Spendable / Stake / Unconfirmed rows. v6.1.6 had Total set to - `font: 12pt bold` which Qt interpreted as weight 75 — visually - indistinguishable from the other bold balance labels. + Spendable / Stake / Unconfirmed rows. +- Transactions amount column **Confirming tier color** is now + `#4A8C5E` (mid green) instead of `#C5EBC9` (pale mint). The pale + mint was too close to the bright `#7CDB8A` Confirmed green on + the dark background and read as the same color. Mid green sits + clearly between grey (Unconfirmed) and bright green (Confirmed) + so the three tiers are visually distinct. +- Transactions amount column **now reads confirmation depth + directly** (new `DepthRole` on `TransactionTableModel`) instead + of going through the `TransactionStatus` enum. The rule fires on + every block increment, not just on enum state transitions. + Affects both `transactiontablemodel.cpp` (Transactions tab) and + `overviewpage.cpp` (Overview recent-5 list). ## [6.1.6] - 2026-07-08 diff --git a/packaging/rpm/triangles.spec b/packaging/rpm/triangles.spec index bb30363..8b39db0 100644 --- a/packaging/rpm/triangles.spec +++ b/packaging/rpm/triangles.spec @@ -47,7 +47,12 @@ install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/applications/triangles-qt.desk * Wed Jul 08 2026 Sami Ahmed - 6.1.7-1 - 6.1.7 release. UI: Overview Total label font-weight bumped from 75 to 900 so the Total actually reads as bold against Spendable/Stake. - Builds on v6.1.6 (conditional Total color + 3-tier amount colors). + Transactions amount column Confirming-tier color changed from pale + mint (#C5EBC9) to mid green (#4A8C5E) so it reads as visibly + different from the bright Confirmed green. Both paint sites now + read confirmation depth via a new DepthRole on the table model + instead of the status enum, so the color fires on every block + increment. * Wed Jul 08 2026 Sami Ahmed - 6.1.6-1 - 6.1.6 release. UI: Overview Total label now conditional (green when diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h index e8e703b..64d6a67 100644 --- a/src/qt/guiconstants.h +++ b/src/qt/guiconstants.h @@ -19,8 +19,10 @@ static const int STATUSBAR_ICONSIZE = 16; #define COLOR_NEGATIVE QColor(255, 0, 0) /* Transaction list -- positive amount (fully confirmed, depth >= RecommendedNumConfirmations) */ #define COLOR_POSITIVE QColor(124, 219, 138) -/* Transaction list -- partially confirmed positive amount (1..RecommendedNumConfirmations-1 confirms) */ -#define COLOR_CONFIRMING QColor(197, 235, 201) +/* Transaction list -- partially confirmed positive amount (1..RecommendedNumConfirmations-1 confirms) + Mid-tone green (#4A8C5E): clearly green but visibly dimmer than the saturated final-state + #7CDB8A so the eye reads the difference between "in progress" and "final" at a glance. */ +#define COLOR_CONFIRMING QColor(74, 140, 94) /* Transaction list -- bare address (without label) */ #define COLOR_BAREADDRESS QColor(97, 40, 14) diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index cc7232b..7fa9b0a 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -59,13 +59,14 @@ public: { foreground = COLOR_UNCONFIRMED; } - else if(index.data(TransactionTableModel::StatusRole).toInt() == (int)TransactionStatus::Confirming) - { - foreground = COLOR_CONFIRMING; - } else { - foreground = COLOR_POSITIVE; + // Use depth directly (DepthRole) instead of the status enum, so the + // rule fires on every confirmation increment, not only on enum state + // transitions. RecommendedNumConfirmations is 4; depths 1..3 = Confirming. + int64_t depth = index.data(TransactionTableModel::DepthRole).toLongLong(); + foreground = (depth > 0 && depth < (int64_t)TransactionRecord::RecommendedNumConfirmations) + ? COLOR_CONFIRMING : COLOR_POSITIVE; } painter->setPen(foreground); QString amountText = TrianglesUnits::formatWithUnit(unit, amount, true); diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 1d404c0..1446183 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -577,29 +577,35 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const case Qt::TextAlignmentRole: return column_alignments[index.column()]; case Qt::ForegroundRole: - // Amount column color rule (3 tiers for positives, 2 for negatives): - // 0 confirms (Unconfirmed) -> COLOR_UNCONFIRMED grey - // Confirming (1..RecommendedNumConfirmations-1) -> COLOR_CONFIRMING light green (positives only) - // Confirmed (depth >= RecommendedNumConfirmations) -> COLOR_POSITIVE bright green - // Immature stays olive via stylesheet (unchanged) - // Conflicted (depth < 0) -> COLOR_UNCONFIRMED grey - // Negative amounts (spent) stay red across all confirmation tiers. - if(index.column() == Amount) - { - qint64 amount = rec->credit + rec->debit; - // Grey: unconfirmed, conflicted, or otherwise not counting for balance (and not immature) - if(!rec->status.countsForBalance && rec->status.status != TransactionStatus::Immature) + // Amount column color rule (3 tiers for positives, 2 for negatives): + // 0 confirms (Unconfirmed) -> COLOR_UNCONFIRMED grey + // 1..RecommendedNumConfirmations-1 (Confirming) -> COLOR_CONFIRMING mid green + // RecommendedNumConfirmations+ (Confirmed) -> COLOR_POSITIVE bright green + // Immature stays olive via stylesheet (unchanged) + // Conflicted (depth < 0) -> COLOR_UNCONFIRMED grey + // Negative amounts (spent) stay red across all confirmation tiers. + // Uses rec->status.depth directly (not the status enum) so the rule fires + // on every confirmation increment, not just on enum state transitions. + if(index.column() == Amount) { - return COLOR_UNCONFIRMED; + qint64 amount = rec->credit + rec->debit; + // Grey: unconfirmed, conflicted, or otherwise not counting for balance (and not immature) + if(!rec->status.countsForBalance && rec->status.status != TransactionStatus::Immature) + { + return COLOR_UNCONFIRMED; + } + // Negative amounts always red (spent), no matter confirmation tier + if(amount < 0) + { + return COLOR_NEGATIVE; + } + // Positive amounts: mid green while still confirming, bright green once fully confirmed + if(rec->status.depth > 0 && rec->status.depth < TransactionRecord::RecommendedNumConfirmations) + { + return COLOR_CONFIRMING; + } + return COLOR_POSITIVE; } - // Negative amounts always red (spent), no matter confirmation tier - if(amount < 0) - { - return COLOR_NEGATIVE; - } - // Positive amounts: lighter green while still confirming, bright green once fully confirmed - return rec->status.status == TransactionStatus::Confirming ? COLOR_CONFIRMING : COLOR_POSITIVE; - } if(!rec->status.countsForBalance && rec->status.status != TransactionStatus::Immature) { return COLOR_UNCONFIRMED; @@ -629,6 +635,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const return formatTxAmount(rec, false); case StatusRole: return rec->status.status; + case DepthRole: + return rec->status.depth; } return QVariant(); } diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h index e3576df..d706822 100644 --- a/src/qt/transactiontablemodel.h +++ b/src/qt/transactiontablemodel.h @@ -49,7 +49,9 @@ public: /** Formatted amount, without brackets when unconfirmed */ FormattedAmountRole, /** Transaction status (TransactionRecord::Status) */ - StatusRole + StatusRole, + /** Raw confirmation depth (number of confirmations, or -1 if conflicted) */ + DepthRole }; int rowCount(const QModelIndex &parent) const;