From 4295311da34ed8132351855f057decedfe434b44 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 6 May 2012 16:57:12 +0200 Subject: [PATCH] move many overviewpage settings from code to ui XML-file / removed ability to translate "0 BTC" and "123.456 BTC" as this is only used as preview in the Qt Designer anyway / set mouse cursor to IBeam for selectable labels --- src/qt/forms/overviewpage.ui | 44 ++++++++++++++++++++++++++++++++++-- src/qt/overviewpage.cpp | 14 ------------ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 3cf7dd0ed3..aeace9f30d 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -43,8 +43,23 @@ + + + 75 + true + + + + IBeamCursor + + + Your current balance + - 123.456 BTC + 123.456 BTC + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -57,6 +72,9 @@ + + Total number of transactions in wallet + 0 @@ -71,8 +89,23 @@ + + + 75 + true + + + + IBeamCursor + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + - 0 BTC + 0 BTC + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -81,6 +114,7 @@ 11 + 75 true @@ -127,6 +161,9 @@ + + QListView { background:transparent } + QFrame::NoFrame @@ -136,6 +173,9 @@ Qt::ScrollBarAlwaysOff + + QAbstractItemView::NoSelection + diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 5b5a8f5271..259f819deb 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -98,23 +98,9 @@ OverviewPage::OverviewPage(QWidget *parent) : { ui->setupUi(this); - // Balance: - ui->labelBalance->setFont(QFont("Monospace", -1, QFont::Bold)); - ui->labelBalance->setToolTip(tr("Your current balance")); - ui->labelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard); - - // Unconfirmed balance: - ui->labelUnconfirmed->setFont(QFont("Monospace", -1, QFont::Bold)); - ui->labelUnconfirmed->setToolTip(tr("Total of transactions that have yet to be confirmed, and do not yet count toward the current balance")); - ui->labelUnconfirmed->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard); - - ui->labelNumTransactions->setToolTip(tr("Total number of transactions in wallet")); - // Recent transactions - ui->listTransactions->setStyleSheet("QListView { background:transparent }"); ui->listTransactions->setItemDelegate(txdelegate); ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE)); - ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection); ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2)); ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);