Browse Source

unconfirmed amount = grey

miguelfreitas
Wladimir J. van der Laan 14 years ago
parent
commit
82303fc3ca
  1. 9
      src/qt/overviewpage.cpp

9
src/qt/overviewpage.cpp

@ -14,6 +14,8 @@
#include <QPainter> #include <QPainter>
#define DECORATION_SIZE 64 #define DECORATION_SIZE 64
#define NUM_ITEMS 3
class TxViewDelegate : public QItemDelegate class TxViewDelegate : public QItemDelegate
{ {
//Q_OBJECT //Q_OBJECT
@ -57,6 +59,10 @@ public:
{ {
foreground = COLOR_NEGATIVE; foreground = COLOR_NEGATIVE;
} }
else if(!confirmed)
{
foreground = COLOR_UNCONFIRMED;
}
else else
{ {
foreground = option.palette.color(QPalette::Text); foreground = option.palette.color(QPalette::Text);
@ -105,6 +111,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
ui->listTransactions->setItemDelegate(txdelegate); ui->listTransactions->setItemDelegate(txdelegate);
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE)); ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection); ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection);
ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
} }
OverviewPage::~OverviewPage() OverviewPage::~OverviewPage()
@ -134,7 +141,7 @@ void OverviewPage::setModel(WalletModel *model)
TransactionFilterProxy *filter = new TransactionFilterProxy(); TransactionFilterProxy *filter = new TransactionFilterProxy();
filter->setSourceModel(model->getTransactionTableModel()); filter->setSourceModel(model->getTransactionTableModel());
filter->setLimit(3); filter->setLimit(NUM_ITEMS);
filter->setDynamicSortFilter(true); filter->setDynamicSortFilter(true);
filter->setSortRole(Qt::EditRole); filter->setSortRole(Qt::EditRole);
filter->sort(TransactionTableModel::Status, Qt::DescendingOrder); filter->sort(TransactionTableModel::Status, Qt::DescendingOrder);

Loading…
Cancel
Save