Browse Source

[Qt] add all used colors in txtablemodel to guiconstants

- add colors used in TX status decoration
0.10
Philip Kaufmann 10 years ago
parent
commit
21f1516468
  1. 6
      src/qt/guiconstants.h
  2. 7
      src/qt/transactiontablemodel.cpp

6
src/qt/guiconstants.h

@ -23,6 +23,12 @@ static const int STATUSBAR_ICONSIZE = 16;
#define COLOR_NEGATIVE QColor(255, 0, 0) #define COLOR_NEGATIVE QColor(255, 0, 0)
/* Transaction list -- bare address (without label) */ /* Transaction list -- bare address (without label) */
#define COLOR_BAREADDRESS QColor(140, 140, 140) #define COLOR_BAREADDRESS QColor(140, 140, 140)
/* Transaction list -- TX status decoration - open until date */
#define COLOR_TX_STATUS_OPENUNTILDATE QColor(64, 64, 255)
/* Transaction list -- TX status decoration - offline */
#define COLOR_TX_STATUS_OFFLINE QColor(192, 192, 192)
/* Transaction list -- TX status decoration - default color */
#define COLOR_BLACK QColor(0, 0, 0)
/* Tooltips longer than this (in characters) are converted into rich text, /* Tooltips longer than this (in characters) are converted into rich text,
so that they can be word-wrapped. so that they can be word-wrapped.

7
src/qt/transactiontablemodel.cpp

@ -450,9 +450,9 @@ QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx)
{ {
case TransactionStatus::OpenUntilBlock: case TransactionStatus::OpenUntilBlock:
case TransactionStatus::OpenUntilDate: case TransactionStatus::OpenUntilDate:
return QColor(64,64,255); return COLOR_TX_STATUS_OPENUNTILDATE;
case TransactionStatus::Offline: case TransactionStatus::Offline:
return QColor(192,192,192); return COLOR_TX_STATUS_OFFLINE;
case TransactionStatus::Unconfirmed: case TransactionStatus::Unconfirmed:
return QIcon(":/icons/transaction_0"); return QIcon(":/icons/transaction_0");
case TransactionStatus::Confirming: case TransactionStatus::Confirming:
@ -476,8 +476,9 @@ QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx)
case TransactionStatus::MaturesWarning: case TransactionStatus::MaturesWarning:
case TransactionStatus::NotAccepted: case TransactionStatus::NotAccepted:
return QIcon(":/icons/transaction_0"); return QIcon(":/icons/transaction_0");
default:
return COLOR_BLACK;
} }
return QColor(0,0,0);
} }
QVariant TransactionTableModel::txWatchonlyDecoration(const TransactionRecord *wtx) const QVariant TransactionTableModel::txWatchonlyDecoration(const TransactionRecord *wtx) const

Loading…
Cancel
Save