qt: peers-tab resizeColumnsToContents#338
qt: peers-tab resizeColumnsToContents#338RandyMcMillan wants to merge 1 commit intobitcoin-core:masterfrom RandyMcMillan:tableview-resize
Conversation
|
Related to #256 This PR handles resizing column widths programmatically. |
jarolrod
left a comment
There was a problem hiding this comment.
I'm failing to understand what this is trying to address, can you clarify a bit? 🤔
| if (role == Qt::DisplayRole) { | ||
| switch (column) { | ||
| case Bumper: | ||
| return QString::fromStdString(""); |
There was a problem hiding this comment.
why does this need to be QString::fromStdString("")
| return {}; | ||
| } // no default case, so the compiler can warn about missing cases | ||
| case Subversion: | ||
| return QVariant(Qt::AlignLeft | Qt::AlignVCenter); |
There was a problem hiding this comment.
isn't this unrelated to what you want to do?
| case PeerTableModel::Subversion: | ||
| return left_stats.cleanSubVer.compare(right_stats.cleanSubVer) < 0; | ||
| case PeerTableModel::Bumper: | ||
| return left_stats.nodeid < right_stats.nodeid; |
There was a problem hiding this comment.
Sorting by nodeid was simply to have sorting functionality for that column as opposed to no sorting functionality.
Goal of this PR/Discussion
Motivations for /gui fork as far as I can tell...
|
|
Concept NACK. There are some concerns about
Usually, in this project, we strive do not make decisions instead of users in such questions :)
|
|
Concept NACK This unnecessarily restricts the user-configurability of the GUI. Testing this PR, I am no longer able to resize the tabs on my own to my liking. Per Qt docs, this is because of the use of QHeaderView::ResizeToContents. In general, we should ONLY restrict user freedom when there is good reason and motivation to do so. Tables are meant to be resized to one's liking; not everyone wants to see the Users of the GUI do want to customize the sizing of various aspects of the interface and have that saved and restored. This is a precedent that has been set by the direction GUI development has taken, See #165, #194, #205, and #256. |
|
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
|
Can we make it do this only until the user tries to manually resize a column? |

No description provided.