mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
qt: Do not extend recent transaction width to address/label string
This commit is contained in:
parent
3a2c84a6b5
commit
9ea1da6fc9
1 changed files with 2 additions and 3 deletions
|
@ -72,7 +72,6 @@ public:
|
|||
painter->setPen(foreground);
|
||||
QRect boundingRect;
|
||||
painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect);
|
||||
int address_rect_min_width = boundingRect.width();
|
||||
|
||||
if (index.data(TransactionTableModel::WatchonlyRole).toBool())
|
||||
{
|
||||
|
@ -80,7 +79,6 @@ public:
|
|||
QRect watchonlyRect(boundingRect.right() + 5, mainRect.top()+ypad+halfheight, 16, halfheight);
|
||||
iconWatchonly = platformStyle->TextColorIcon(iconWatchonly);
|
||||
iconWatchonly.paint(painter, watchonlyRect);
|
||||
address_rect_min_width += 5 + watchonlyRect.width();
|
||||
}
|
||||
|
||||
if(amount < 0)
|
||||
|
@ -109,7 +107,8 @@ public:
|
|||
QRect date_bounding_rect;
|
||||
painter->drawText(amountRect, Qt::AlignLeft | Qt::AlignVCenter, GUIUtil::dateTimeStr(date), &date_bounding_rect);
|
||||
|
||||
const int minimum_width = std::max(address_rect_min_width, amount_bounding_rect.width() + date_bounding_rect.width());
|
||||
// 0.4*date_bounding_rect.width() is used to visually distinguish a date from an amount.
|
||||
const int minimum_width = 1.4 * date_bounding_rect.width() + amount_bounding_rect.width();
|
||||
const auto search = m_minimum_width.find(index.row());
|
||||
if (search == m_minimum_width.end() || search->second != minimum_width) {
|
||||
m_minimum_width[index.row()] = minimum_width;
|
||||
|
|
Loading…
Reference in a new issue