Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 89 additions & 96 deletions src/qt/forms/networkwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,95 @@
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="labelChainLocks">
<property name="text">
<string>ChainLocks</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="bestClHeightLabel">
<property name="text">
<string>Current block height</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QLabel" name="bestClHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="bestClTimeLabel">
<property name="text">
<string>Last block time</string>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QLabel" name="bestClTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="bestClHashLabel">
<property name="text">
<string>Last block hash</string>
</property>
</widget>
</item>
<item row="16" column="1">
<widget class="QLabel" name="bestClHash">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="17" column="0">
<spacer name="leftVerticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
Expand Down Expand Up @@ -300,102 +389,6 @@
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="bottomGridLayout" columnstretch="0,1">
<property name="horizontalSpacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="labelChainLocks">
<property name="text">
<string>ChainLocks</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="bestClHeightLabel">
<property name="text">
<string>Current block height</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="bestClHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="bestClTimeLabel">
<property name="text">
<string>Last block time</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="bestClTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="bestClHashLabel">
<property name="text">
<string>Last block hash</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="bestClHash">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
Expand Down
4 changes: 4 additions & 0 deletions src/qt/forms/proposalinfo.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayoutGovernance" columnstretch="0,1,0">
<property name="leftMargin"><number>0</number></property>
<property name="topMargin"><number>0</number></property>
<property name="rightMargin"><number>0</number></property>
<property name="bottomMargin"><number>0</number></property>
<property name="horizontalSpacing">
<number>12</number>
</property>
Expand Down
21 changes: 1 addition & 20 deletions src/qt/networkwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions src/qt/networkwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading