]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
restore useful paused status text format
authorgg <chown_tee@proton.me>
Sun, 18 Jan 2026 05:40:50 +0000 (00:40 -0500)
committergg <chown_tee@proton.me>
Sun, 18 Jan 2026 05:40:57 +0000 (00:40 -0500)
src/MainWindow.cpp

index dfcec1a5d9229bafeceeaeb6281a76a006317ef2..8d40e60d57bd55404a507a7b56abb234ba7d148f 100644 (file)
@@ -821,7 +821,7 @@ void MainWindow::onBalanceUpdated(quint64 balance, quint64 spendable) {
         copyableVal = amount;
 
         if (displaySetting == Config::spendablePlusUnconfirmed && balance > spendable) {
-            balance_str += QString(" (+%1 XMR unconfirmed)").arg(WalletManager::displayAmount(balance - spendable, false, decimals));
+            balance_str += QString(" <font color='#ffd60a'>(+%1 XMR unconfirmed)</font>").arg(WalletManager::displayAmount(balance - spendable, false, decimals));
         }
     }
 
@@ -1080,7 +1080,6 @@ void MainWindow::onConnectionStatusChanged(int status)
         QString statusStr = this->getPausedStatusText();
 
         m_statusBtnConnectionStatusIndicator->setIcon(icon);
-        m_statusBtnConnectionStatusIndicator->setToolTip(tr("Sync Paused"));
         this->setStatusText(statusStr);
 
         // Hide the "Net Stats" (D: 0.0 B) label since we aren't downloading
@@ -1950,6 +1949,17 @@ void MainWindow::onWalletPassphraseNeeded(bool on_device) {
 }
 
 QString MainWindow::getPausedStatusText() {
+    if (!m_wallet) return tr("Sync Paused");
+
+    quint64 walletHeight = m_wallet->blockChainHeight();
+    quint64 targetHeight = m_wallet->daemonBlockChainTargetHeight();
+
+    if (walletHeight > 0 && targetHeight > 0) {
+        quint64 blocksBehind = Utils::blocksBehind(walletHeight, targetHeight);
+        if (blocksBehind > 0) {
+            return tr("[SYNC PAUSED] - %1 blocks behind").arg(QLocale().toString(blocksBehind));
+        }
+    }
     return tr("[SYNC PAUSED]");
 }