Conversation
promag
left a comment
There was a problem hiding this comment.
We reuse the same icon used in the Console Tab for Gui consistency.
How so? One clears the console while the other unselects the peer.
src/qt/rpcconsole.cpp
Outdated
| ui->lineEdit->setMaxLength(16 * 1024 * 1024); | ||
| ui->messagesWidget->installEventFilter(this); | ||
|
|
||
| connect(ui->hidePeersDetailButton, &QAbstractButton::clicked, [this] { hidePeersDetail(); }); |
There was a problem hiding this comment.
Just
connect(ui->hidePeersDetailButton, &QAbstractButton::clicked, this, &RPCConsole::clearSelectedNode);and ditch hidePeersDetails.
|
Since it's possible to select multiple peers, but only one shows in the panel, perhaps leaving the "close" button is best, but don't have it deselect? |
40ebab7 to
205c965
Compare
|
I split this PR into 2 commits so others can experiment with adding the button to src/qt/forms/debugwindow.ui |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
|
@w0xlt any suggestions on reducing the diff in the .ui file would be appreciated - this is left unsquashed to allow for suggestions/variations |
|
You can delete the last commit ( diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
index 15e0d3fad..ad671b02e 100644
--- a/src/qt/forms/debugwindow.ui
+++ b/src/qt/forms/debugwindow.ui
@@ -984,6 +984,117 @@
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_8">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="peerHeading">
+ <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="font">
+ <font>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Select a peer to view detailed information.</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignHCenter|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="hidePeersDetail" native="true">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <widget class="QToolButton" name="hidePeersDetailButton">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>32</width>
+ <height>32</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Hide Peers Detail</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string />
+ </property>
+ <property name="icon">
+ <iconset resource="../bitcoin.qrc">
+ <normaloff>:/icons/remove</normaloff>
+ :/icons/remove
+ </iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+X</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </item>
<item>
<widget class="QLabel" name="peerHeading">
<property name="sizePolicy"> |
205c965 to
2ae79d0
Compare
|
Commit: 2ae79d0 |
|
tACK 2ae79d0 on ARM M1/macOS/Monterey 12.1 (Qt 5.15.2) |
|
|
@RandyMcMillan Still working on this PR? |
|
🤔 There hasn't been much activity lately and the CI seems to be failing. If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in. |
|
This #505 (comment) still needs to be addressed. |
d59363a to
436ac4f
Compare
|
436ac4f duplicate ui element removed per @pablomartin4btc comment. |
|
Thanks I saw that - I can update the commit message... |
436ac4f to
00000b8
Compare
|
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. |
00000b8 to
f722065
Compare
Add a close (X) button to the Peers Detail panel. Reuse the same icon used in the Console Tab. The close button deselects the peer highlighted in the PeerTableView and hides the detail panel. This PR addresses issue bitcoin-core#485: Co-authored-by: @w0xlt <w0xlt@users.noreply.github.com>
f722065 to
41a1a86
Compare
|
thanks! |







Add a close (X) button to the Peers Detail panel.
Reuse the same icon used in the Console Tab.
The close button deselects the peer highlighted
in the PeerTableView and hides the detail panel.
fixes #485