From 6cf7259e58bc2bf08646e3a270bcdb900a2501f5 Mon Sep 17 00:00:00 2001 From: pasta Date: Wed, 11 Mar 2026 23:35:19 -0500 Subject: [PATCH 1/2] fix(qt): consolidate Network tab layout into two-column grid Move ChainLocks from a separate bottom grid into the left column grid, eliminating the dead space between Masternodes and ChainLocks. Remove the now-unnecessary showEvent column-width sync. --- src/qt/forms/networkwidget.ui | 185 ++++++++++++++++------------------ src/qt/networkwidget.cpp | 21 +--- src/qt/networkwidget.h | 3 - 3 files changed, 90 insertions(+), 119 deletions(-) diff --git a/src/qt/forms/networkwidget.ui b/src/qt/forms/networkwidget.ui index 24e52d1a4f54..193e0633aa24 100644 --- a/src/qt/forms/networkwidget.ui +++ b/src/qt/forms/networkwidget.ui @@ -269,6 +269,95 @@ + + + + ChainLocks + + + + + + + Current block height + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Last block time + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Last block hash + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -300,102 +389,6 @@ - - - - 12 - - - - - ChainLocks - - - - - - - Current block height - - - - - - - IBeamCursor - - - N/A - - - Qt::PlainText - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Last block time - - - - - - - IBeamCursor - - - N/A - - - Qt::PlainText - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Last block hash - - - - - - - IBeamCursor - - - N/A - - - Qt::PlainText - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - diff --git a/src/qt/networkwidget.cpp b/src/qt/networkwidget.cpp index 6ff8297f3c7b..790057764d51 100644 --- a/src/qt/networkwidget.cpp +++ b/src/qt/networkwidget.cpp @@ -45,7 +45,7 @@ NetworkWidget::NetworkWidget(QWidget* parent) : ui->labelQuorums}, {GUIUtil::FontWeight::Bold, 16}); - for (auto* element : {ui->labelChainLocks, ui->labelInstantSend, ui->labelMasternodes}) { + for (auto* element : {ui->labelInstantSend, ui->labelMasternodes, ui->labelChainLocks}) { element->setContentsMargins(0, 10, 0, 0); } } @@ -55,25 +55,6 @@ NetworkWidget::~NetworkWidget() delete ui; } -void NetworkWidget::showEvent(QShowEvent* event) -{ - QWidget::showEvent(event); - - // Sync bottom grid label column width with left grid (deferred to showEvent - // so CSS styling and font metrics are fully resolved) - int maxLabelWidth{0}; - for (int row = 0; row < ui->leftGridLayout->rowCount(); ++row) { - if (auto* item = ui->leftGridLayout->itemAtPosition(row, 0)) { - if (auto* widget = item->widget()) { - maxLabelWidth = std::max(maxLabelWidth, widget->sizeHint().width()); - } - } - } - if (maxLabelWidth > 0) { - ui->bottomGridLayout->setColumnMinimumWidth(0, maxLabelWidth); - } -} - void NetworkWidget::setClientModel(ClientModel* model) { clientModel = model; diff --git a/src/qt/networkwidget.h b/src/qt/networkwidget.h index 19b667315fff..4466591106e7 100644 --- a/src/qt/networkwidget.h +++ b/src/qt/networkwidget.h @@ -38,9 +38,6 @@ class NetworkWidget : public QWidget void setClientModel(ClientModel* model); -protected: - void showEvent(QShowEvent* event) override; - private Q_SLOTS: void handleClDataChanged(); void handleCrDataChanged(); From c1f9135d308fdc460125baaa1ed0cf01ad1aae3d Mon Sep 17 00:00:00 2001 From: pasta Date: Wed, 11 Mar 2026 23:46:02 -0500 Subject: [PATCH 2/2] fix(qt): eliminate Governance tab margin mismatch causing jiggle The leftPanel widget in proposalinfo.ui wrapped the governance grid in an extra layer of default margins, offsetting labels vs General/Network tabs. Zero the inner grid margins so the outer QHBoxLayout margins alone control spacing. --- src/qt/forms/proposalinfo.ui | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qt/forms/proposalinfo.ui b/src/qt/forms/proposalinfo.ui index ad150b2c55e3..2b8f36ded853 100644 --- a/src/qt/forms/proposalinfo.ui +++ b/src/qt/forms/proposalinfo.ui @@ -20,6 +20,10 @@ + 0 + 0 + 0 + 0 12