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