Skip to content
Closed
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: 106 additions & 79 deletions src/qt/forms/debugwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>740</width>
<height>430</height>
<width>744</width>
<height>531</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -36,7 +36,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an auto-generated change by QtCreator. Fixed in 0c36420

</property>
<widget class="QWidget" name="tab_info">
<attribute name="title">
Expand Down Expand Up @@ -887,85 +887,112 @@
<height>0</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<layout class="QVBoxLayout" name="verticalLayout_9">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this PR introduced a new sub-Layout, the introduced sub-Layout was named in the chronological order of its introduction. And since verticalLayout_7 already exists (on Line 935), giving this the same name leads to a warning message while compiling:

qt/forms/debugwindow.ui: Warning: The name 'verticalLayout_7' (QVBoxLayout) is already in use, defaulting to 'verticalLayout_71'.

So, I am letting this change be as it is for now, and I welcome any suggestions you might have.

<item>
<widget class="QTableView" name="peerWidget">
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideMiddle</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
<widget class="QSplitter" name="tableSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
<property name="handleWidth">
<number>4</number>
</property>
<attribute name="horizontalHeaderHighlightSections">
<property name="childrenCollapsible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<widget class="QLabel" name="banHeading">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>Banned peers</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QTableView" name="banlistWidget">
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<widget class="QTableView" name="peerWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideMiddle</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
</widget>
<widget class="QWidget" name="banTable" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QLabel" name="banHeading">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>Banned peers</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QTableView" name="banlistWidget">
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -1030,8 +1057,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>426</height>
<width>266</width>
<height>656</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1">
Expand Down
7 changes: 5 additions & 2 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,13 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
}
ui->splitter->restoreState(settings.value("RPCConsoleWindowPeersTabSplitterSizes").toByteArray());
ui->tableSplitter->restoreState(settings.value("RPCConsoleWindowPeersBanTableSplitterSizes").toByteArray());
} else
#endif // ENABLE_WALLET
{
// RPCConsole is a child widget.
ui->splitter->restoreState(settings.value("RPCConsoleWidgetPeersTabSplitterSizes").toByteArray());
ui->tableSplitter->restoreState(settings.value("RPCConsoleWindowPeersBanTableSplitterSizes").toByteArray());
}

m_peer_widget_header_state = settings.value("PeersTabPeerHeaderState").toByteArray();
Expand Down Expand Up @@ -582,11 +584,13 @@ RPCConsole::~RPCConsole()
// RPCConsole widget is a window.
settings.setValue("RPCConsoleWindowGeometry", saveGeometry());
settings.setValue("RPCConsoleWindowPeersTabSplitterSizes", ui->splitter->saveState());
settings.setValue("RPCConsoleWindowPeersBanTableSplitterSizes", ui->tableSplitter->saveState());
} else
#endif // ENABLE_WALLET
{
// RPCConsole is a child widget.
settings.setValue("RPCConsoleWidgetPeersTabSplitterSizes", ui->splitter->saveState());
settings.setValue("RPCConsoleWindowPeersBanTableSplitterSizes", ui->tableSplitter->saveState());
}

settings.setValue("PeersTabPeerHeaderState", m_peer_widget_header_state);
Expand Down Expand Up @@ -1331,8 +1335,7 @@ void RPCConsole::showOrHideBanTableIfRequired()
return;

bool visible = clientModel->getBanTableModel()->shouldShow();
ui->banlistWidget->setVisible(visible);
ui->banHeading->setVisible(visible);
ui->banTable->setVisible(visible);
}

void RPCConsole::setTabFocus(enum TabTypes tabType)
Expand Down