From 94e1b9e05b96e4fe639e5b07b7a53ea216170962 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 4 Aug 2014 13:50:17 +0200 Subject: [PATCH] [Qt] re-work overviewpage UI - ensure normal and watch-only stuff looks consistent - simplify UI by removing unneeded UI layout elements - change some comments to watch-only from watchonly --- src/qt/forms/overviewpage.ui | 685 +++++++++++++++++------------------ src/qt/overviewpage.cpp | 15 +- 2 files changed, 340 insertions(+), 360 deletions(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index df16295f7..7784a862d 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -13,8 +13,8 @@ Form - - + + false @@ -30,7 +30,7 @@ - + @@ -46,374 +46,344 @@ - - - - - - 75 - true - - - - Wallet - - - - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet. - - - QLabel { color: red; } - - - (out of sync) - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - + + + + 75 + true + + + + Balances + + + + + + + WhatsThisCursor + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet. + + + QLabel { color: red; } + + + (out of sync) + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + - - - - - - 75 - true - - - - Watch-only: - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 40 - 20 - - - - - + + + Qt::Horizontal + + + + 40 + 20 + + + - - - - - QFormLayout::AllNonFixedFieldsGrow - - - 12 - - - 12 - - - - - Available: - - - - - - - - 75 - true - - - - IBeamCursor - - - Your current spendable balance - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Pending: - - - - - - - - 75 - true - - - - IBeamCursor - - - Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Immature: - - - - - - - - 75 - true - - - - IBeamCursor - - - Mined balance that has not yet matured - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Qt::Horizontal - - - - - - - Total: - - - - - - - - 75 - true - - - - IBeamCursor - - - Your current total balance - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - + + + 12 + + + + + + 75 + true + + + + IBeamCursor + + + Unconfirmed transactions to watch-only addresses + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + - - - - QFormLayout::AllNonFixedFieldsGrow - - - 12 - - - 12 - - - - - - 75 - true - - - - IBeamCursor - - - Your current balance in watch-only addresses - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 75 - true - - - - IBeamCursor - - - Unconfirmed transactions to watch-only addresses - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 75 - true - - - - IBeamCursor - - - Mined balance in watch-only addresses that has not yet matured - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 0 - 0 - - - - - 140 - 0 - - - - Qt::Horizontal - - - - - - - - 75 - true - - - - IBeamCursor - - - Current total balance in watch-only addresses - - - 0 BTC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - + + + + + 75 + true + + + + IBeamCursor + + + Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + - - + + + + + 75 + true + + + + IBeamCursor + + + Mined balance in watch-only addresses that has not yet matured + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 140 + 0 + + Qt::Horizontal - - QSizePolicy::Expanding + + + + + + Total: + + + + + + + + 75 + true + + + + IBeamCursor + + + Mined balance that has not yet matured + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal - 20 + 40 20 + + + + Immature: + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current total balance + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 75 + true + + + + IBeamCursor + + + Current total balance in watch-only addresses + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Watch-only: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Available: + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current spendable balance + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current balance in watch-only addresses + + + 0.000 000 00 BTC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Pending: + + + + + + + Spendable: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -449,13 +419,22 @@ + + + 75 + true + + - <b>Recent transactions</b> + Recent transactions + + WhatsThisCursor + The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet. diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 1c700b37f..b5a3de48c 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -162,15 +162,16 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 bool showWatchOnlyImmature = watchImmatureBalance != 0; bool showWatchOnly = (watchOnlyBalance != 0 || watchUnconfBalance != 0 || showWatchOnlyImmature); - // for symmetry reasons also show immature label when the watchonly one is shown + // for symmetry reasons also show immature label when the watch-only one is shown ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature); ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature); - ui->labelWatchonly->setVisible(showWatchOnly); // show Watchonly label - ui->lineWatchBalance->setVisible(showWatchOnly); // show watchonly balance separator line - ui->labelWatchAvailable->setVisible(showWatchOnly); // show watchonly available balance - ui->labelWatchImmature->setVisible(showWatchOnlyImmature); // show watchonly immature balance - ui->labelWatchPending->setVisible(showWatchOnly); // show watchonly pending balance - ui->labelWatchTotal->setVisible(showWatchOnly); // show watchonly total balance + ui->labelSpendable->setVisible(showWatchOnly); // show spendable label (only when watch-only is active) + ui->labelWatchonly->setVisible(showWatchOnly); // show watch-only label + ui->lineWatchBalance->setVisible(showWatchOnly); // show watch-only balance separator line + ui->labelWatchAvailable->setVisible(showWatchOnly); // show watch-only available balance + ui->labelWatchImmature->setVisible(showWatchOnlyImmature); // show watch-only immature balance + ui->labelWatchPending->setVisible(showWatchOnly); // show watch-only pending balance + ui->labelWatchTotal->setVisible(showWatchOnly); // show watch-only total balance } void OverviewPage::setClientModel(ClientModel *model)