Merge gui_peers_no_net_column

This commit is contained in:
Luke Dashjr 2025-03-05 03:27:08 +00:00
commit 56925da3ae
2 changed files with 2 additions and 6 deletions

View File

@ -54,11 +54,11 @@ public:
Direction,
Address,
ConnectionType,
Network,
Ping,
Sent,
Received,
Subversion
Subversion,
Network, // Not used, just kept at the end to avoid excessive code removal
};
enum {
@ -100,9 +100,6 @@ private:
/*: Title of Peers Table column which describes the type of
peer connection. The "type" describes why the connection exists. */
tr("Type"),
/*: Title of Peers Table column which states the network the peer
connected through. */
tr("Network"),
/*: Title of Peers Table column which indicates the current latency
of the connection with the peer. */
tr("Ping"),

View File

@ -771,7 +771,6 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH);
ui->peerWidget->setColumnWidth(PeerTableModel::ConnectionType, GUIUtil::TextWidth(fm, GUIUtil::ConnectionTypeToQString(ConnectionType::ADDR_FETCH /* TODO: Find the WIDEST string? */, /*prepend_direction=*/false)));
const auto bytesize_width = GUIUtil::TextWidth(fm, GUIUtil::formatBytes(999'000'000'000) + QStringLiteral("x"));
ui->peerWidget->setColumnWidth(PeerTableModel::Network, GUIUtil::TextWidth(fm, qvariant_cast<QString>(model->peerTableSortProxy()->headerData(PeerTableModel::ColumnIndex::Network, Qt::Horizontal, Qt::DisplayRole)) /* TODO: Find the WIDEST string? */ + QStringLiteral("x")));
ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);
ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);
ui->peerWidget->setColumnWidth(PeerTableModel::Sent, bytesize_width);