Add abitlity to resize peerTable and banTable#457
Add abitlity to resize peerTable and banTable#457shaavan wants to merge 2 commits intobitcoin-core:masterfrom
Conversation
|
concept ACK I like the resize. Are they connected or active traffic? |
I think they both mean the same thing in this context. |
luke-jr
left a comment
There was a problem hiding this comment.
The new label is redundant: the tab name itself indicates what the user is viewing.
Concept ACK to adding a splitter.
5e54cfe to
c09e6ad
Compare
|
Updated 5e54cfe to c09e6ad (pr457.01 -> pr457.02) Updates:
@jarolrod. As you rightly mentioned, showing splitter when no BanTable was looking kind of off. But in the new iteration of this PR, the splitter seems like an element of peerTable and looks aesthetically pleasing even when there is no banTable. I have updated the PR description with the new Screenshots. You can look at them to better get the feel of what I am trying to say. |
jarolrod
left a comment
There was a problem hiding this comment.
Getting there, but the splitter should behave like the splitter that currently exists between the Peers Table and the Peer Information Pane.
When I select a Peer, I get the Peer Information Pane, as well as a splitter where I can resize as needed. When the peer is de-selected, the splitter disappears; because there is nothing to resize.
Similarly, until I have a banned peer and a banned peer table, the splitter being introduced here should not be displayed at all because there is nothing to resize. Additionally, if i unban a peer and subsequently no longer have a banned peers table, the splitter should disappear as well.
c09e6ad to
aa6229e
Compare
|
Updated from c09e6ad to aa6229e (pr457.02 -> pr457.03, diff) Changes:
|
|
cc @jarolrod. PR ready for another review! |
src/qt/forms/debugwindow.ui
Outdated
| <set>Qt::NoTextInteraction</set> | ||
| <widget class="QSplitter" name="tableSplitter"> | ||
| <property name="styleSheet"> | ||
| <string notr="true">QSplitter::handle{background: #a6a6a6;}</string> |
There was a problem hiding this comment.
I did this to make the splitter visible and looks aesthetically pleasing.
Do you recommend keeping the splitter invisible?
There was a problem hiding this comment.
Do you recommend keeping the splitter invisible?
I don't think the hardcoded color will work for any platform and appearance (dark/light), no?
There was a problem hiding this comment.
I don't think the hardcoded color will work for any platform and appearance (dark/light), no?
The spiller looks fine for the default light mode (in Linux) and dark mode in macOS, which can be seen in the screenshots of the following comments: light; dark.
However, this doesn't guarantee that this will work for any custom appearance. Do you recommend removing the hardcoded color and making the splitter invisible again?
There was a problem hiding this comment.
Why not keeping the same look as for the horizontal splitter?
Do you recommend keeping the splitter invisible?
What does make you think so?
There was a problem hiding this comment.
Do you recommend keeping the splitter invisible?
By this, I meant to say, keeping it the same as the horizontal splitter.
Why not keep the same look as for horizontal splitter?
I think this will be a more optimal approach to go with.
There was a problem hiding this comment.
At least, introducing a new GUI element, and changing GUI element style across the GUI are two different tasks.
There was a problem hiding this comment.
Fixed splitter color to default palette in 0c36420
|
Concept ACK. |
src/qt/rpcconsole.cpp
Outdated
| //Setup Peer and Ban Table Splitter | ||
| ui->tableSplitter->setChildrenCollapsible(false); | ||
|
|
There was a problem hiding this comment.
This code could be a part of the debugwindow.ui file as it is for the horizontal splitter.
Qt Designer tool could very helpful for such tasks.
| <number>0</number> | ||
| <number>3</number> |
There was a problem hiding this comment.
This was an auto-generated change by QtCreator. Fixed in 0c36420
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
aa6229e to
0c36420
Compare
| </size> | ||
| </property> | ||
| <layout class="QVBoxLayout" name="verticalLayout_7"> | ||
| <layout class="QVBoxLayout" name="verticalLayout_9"> |
There was a problem hiding this comment.
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.
- This is a pure refactoring change and is done so that the table splitter can be added between peerTable and banTable in the following commit.
This commit adds a splitter between the peerWidget and the banTable widget. This adds the ability to resize these windows to the user’s needs.
0c36420 to
5a9bdce
Compare
|
Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened. |





Till now, peerTable and banTable under the peerTab were fixed in height and cannot be resized. This creates unnecessary inconvenience, especially when you have many items on one table and not many on another.
This PR proposes to add a splitter between these two tables, allowing them to be resized freely.