From 82303fc3ca8762e5d3b9afe521069df81190b9ab Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 3 Aug 2011 21:04:15 +0200 Subject: [PATCH] unconfirmed amount = grey --- src/qt/overviewpage.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index f79e1f3e9a..98f0476ba6 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -14,6 +14,8 @@ #include #define DECORATION_SIZE 64 +#define NUM_ITEMS 3 + class TxViewDelegate : public QItemDelegate { //Q_OBJECT @@ -57,6 +59,10 @@ public: { foreground = COLOR_NEGATIVE; } + else if(!confirmed) + { + foreground = COLOR_UNCONFIRMED; + } else { foreground = option.palette.color(QPalette::Text); @@ -105,6 +111,7 @@ OverviewPage::OverviewPage(QWidget *parent) : 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)); } OverviewPage::~OverviewPage() @@ -134,7 +141,7 @@ void OverviewPage::setModel(WalletModel *model) TransactionFilterProxy *filter = new TransactionFilterProxy(); filter->setSourceModel(model->getTransactionTableModel()); - filter->setLimit(3); + filter->setLimit(NUM_ITEMS); filter->setDynamicSortFilter(true); filter->setSortRole(Qt::EditRole); filter->sort(TransactionTableModel::Status, Qt::DescendingOrder);