@@ -71,14 +71,12 @@ class TxViewDelegate : public QAbstractItemDelegate
71
71
painter->setPen (foreground);
72
72
QRect boundingRect;
73
73
painter->drawText (addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect);
74
- int address_rect_min_width = boundingRect.width ();
75
74
76
75
if (index .data (TransactionTableModel::WatchonlyRole).toBool ())
77
76
{
78
77
QIcon iconWatchonly = qvariant_cast<QIcon>(index .data (TransactionTableModel::WatchonlyDecorationRole));
79
78
QRect watchonlyRect (boundingRect.right () + 5 , mainRect.top ()+ypad+halfheight, 16 , halfheight);
80
79
iconWatchonly.paint (painter, watchonlyRect);
81
- address_rect_min_width += 5 + watchonlyRect.width ();
82
80
}
83
81
84
82
if (amount < 0 )
@@ -107,7 +105,8 @@ class TxViewDelegate : public QAbstractItemDelegate
107
105
QRect date_bounding_rect;
108
106
painter->drawText (amountRect, Qt::AlignLeft | Qt::AlignVCenter, GUIUtil::dateTimeStr (date), &date_bounding_rect);
109
107
110
- const int minimum_width = std::max (address_rect_min_width, amount_bounding_rect.width () + date_bounding_rect.width ());
108
+ // 0.4*date_bounding_rect.width() is used to visually distinguish a date from an amount.
109
+ const int minimum_width = 1.4 * date_bounding_rect.width () + amount_bounding_rect.width ();
111
110
const auto search = m_minimum_width.find (index .row ());
112
111
if (search == m_minimum_width.end () || search->second != minimum_width) {
113
112
m_minimum_width[index .row ()] = minimum_width;
0 commit comments