mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-23 13:04:17 +00:00
Make status column narrow (icon only, details on tooltip)
This commit is contained in:
parent
5363cb05f6
commit
a790ec5884
@ -71,7 +71,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
|
|||||||
|
|
||||||
// Address: <address>: New... : Paste to clipboard
|
// Address: <address>: New... : Paste to clipboard
|
||||||
QHBoxLayout *hbox_address = new QHBoxLayout();
|
QHBoxLayout *hbox_address = new QHBoxLayout();
|
||||||
hbox_address->addWidget(new QLabel(tr("Your Bitcoin Address:")));
|
hbox_address->addWidget(new QLabel(tr("Your Bitcoin address:")));
|
||||||
address = new QLineEdit();
|
address = new QLineEdit();
|
||||||
address->setReadOnly(true);
|
address->setReadOnly(true);
|
||||||
address->setFont(GUIUtil::bitcoinAddressFont());
|
address->setFont(GUIUtil::bitcoinAddressFont());
|
||||||
@ -261,7 +261,7 @@ void BitcoinGUI::setTabsModel(QAbstractItemModel *transaction_model)
|
|||||||
transaction_table->verticalHeader()->hide();
|
transaction_table->verticalHeader()->hide();
|
||||||
|
|
||||||
transaction_table->horizontalHeader()->resizeSection(
|
transaction_table->horizontalHeader()->resizeSection(
|
||||||
TransactionTableModel::Status, 145);
|
TransactionTableModel::Status, 23);
|
||||||
transaction_table->horizontalHeader()->resizeSection(
|
transaction_table->horizontalHeader()->resizeSection(
|
||||||
TransactionTableModel::Date, 120);
|
TransactionTableModel::Date, 120);
|
||||||
transaction_table->horizontalHeader()->setResizeMode(
|
transaction_table->horizontalHeader()->setResizeMode(
|
||||||
|
@ -443,8 +443,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
|||||||
/* Delegate to specific column handlers */
|
/* Delegate to specific column handlers */
|
||||||
switch(index.column())
|
switch(index.column())
|
||||||
{
|
{
|
||||||
case Status:
|
//case Status:
|
||||||
return formatTxStatus(rec);
|
// return formatTxStatus(rec);
|
||||||
case Date:
|
case Date:
|
||||||
return formatTxDate(rec);
|
return formatTxDate(rec);
|
||||||
case Description:
|
case Description:
|
||||||
@ -472,6 +472,13 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
|||||||
return rec->credit;
|
return rec->credit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (role == Qt::ToolTipRole)
|
||||||
|
{
|
||||||
|
if(index.column() == Status)
|
||||||
|
{
|
||||||
|
return formatTxStatus(rec);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (role == Qt::TextAlignmentRole)
|
else if (role == Qt::TextAlignmentRole)
|
||||||
{
|
{
|
||||||
return column_alignments[index.column()];
|
return column_alignments[index.column()];
|
||||||
@ -522,6 +529,21 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat
|
|||||||
else if (role == Qt::TextAlignmentRole)
|
else if (role == Qt::TextAlignmentRole)
|
||||||
{
|
{
|
||||||
return column_alignments[section];
|
return column_alignments[section];
|
||||||
|
} else if (role == Qt::ToolTipRole)
|
||||||
|
{
|
||||||
|
switch(section)
|
||||||
|
{
|
||||||
|
case Status:
|
||||||
|
return tr("Transaction status. Hover over this field to show number of transactions.");
|
||||||
|
case Date:
|
||||||
|
return tr("Date and time that the transaction was received.");
|
||||||
|
case Description:
|
||||||
|
return tr("Short description of the transaction.");
|
||||||
|
case Debit:
|
||||||
|
return tr("Amount removed from balance.");
|
||||||
|
case Credit:
|
||||||
|
return tr("Amount added to balance.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user