Peers tab hide horizontal scroll bars #324

pull RandyMcMillan wants to merge 1 commits into bitcoin-core:master from RandyMcMillan:peers-tab-hide-scroll-bars changing 1 files +3 −0
  1. RandyMcMillan commented at 11:21 pm on May 11, 2021: contributor
  2. RandyMcMillan commented at 11:29 pm on May 11, 2021: contributor

    The horizontal scrollbars block click access to rows in the table view and detail view. The vertical scrollbars are useful. The horz. bars are not very useful (IMO).

    Before:

    After:

    Screen Shot 2021-05-11 at 7 28 39 PM

  3. in src/qt/rpcconsole.cpp:619 in c868d1bdaf outdated
    615@@ -616,6 +616,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
    616         ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);
    617         ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);
    618         ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
    619+        ui->peerWidget->horizontalScrollBar()->setStyleSheet("QScrollBar {height:0px;}");
    


    promag commented at 0:29 am on May 12, 2021:
    Have you tried ui->peerWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff)?

    jarolrod commented at 0:43 am on May 13, 2021:

    It’s a NACK from me on removing the horizontal scroll bar from the Peers Table. The user can be left in a state where it is inconvenient to scroll right to see the rest of the content. This is a UX downgrade.

    Note: if there’s consensus for this change (for some reason), you missed disabling the horizontal scroll bar on the banned peers table

    Screen Shot 2021-05-12 at 8 37 04 PM

  4. promag commented at 0:31 am on May 12, 2021: contributor
    I don’t see a reason to hide them, especially considering that the default policy is Qt::ScrollBarAsNeeded.
  5. jarolrod commented at 1:13 am on May 12, 2021: member
    I don’t think this is an improvement, UX-wise. Under this change, the user does not have visual feedback that there is more data to be seen if they scroll horizontally.
  6. hebasto renamed this:
    qt: peers-tab hide horizontal scroll bars
    Peers tab hide horizontal scroll bars
    on May 12, 2021
  7. hebasto added the label UI on May 12, 2021
  8. in src/qt/rpcconsole.cpp:662 in c868d1bdaf outdated
    658@@ -658,6 +659,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
    659         ui->blocksDir->setText(model->blocksDir());
    660         ui->startupTime->setText(model->formatClientStartupTime());
    661         ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));
    662+        ui->scrollArea->horizontalScrollBar()->setStyleSheet("QScrollBar {height:0px;}");
    


    jarolrod commented at 0:48 am on May 13, 2021:

    This should be ok to do since #293 was merged. Instead of changing the stylesheet, you should implement this suggestion: https://github.com/bitcoin-core/gui/pull/324/files#r630627901

    You should change this line as so:

    0-   ui->scrollArea->horizontalScrollBar()->setStyleSheet("QScrollBar {height:0px;}");
    1+   ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    
  9. in src/qt/rpcconsole.cpp:619 in c6bd7ff2d6 outdated
    615@@ -616,6 +616,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
    616         ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);
    617         ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);
    618         ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
    619+        ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    


    hebasto commented at 10:43 am on May 15, 2021:
    How does this change differ from the one in the line 663?
  10. hebasto commented at 10:45 am on May 15, 2021: member

    Agree with @promag

    I don’t see a reason to hide them, especially considering that the default policy is Qt::ScrollBarAsNeeded.

    and with @jarolrod

    It’s a NACK from me on removing the horizontal scroll bar from the Peers Table. The user can be left in a state where it is inconvenient to scroll right to see the rest of the content. This is a UX downgrade.

  11. RandyMcMillan marked this as a draft on May 16, 2021
  12. RandyMcMillan commented at 8:58 pm on May 19, 2021: contributor

    How does/should the user toggle/hide the detail widget when the table data fills the view?

    Screen Shot 2021-05-19 at 4 08 21 PM 2 Screen Shot 2021-05-19 at 4 08 55 PM 2

    Maybe assigning a key command to hide/toggle the detail view would work? <ESC> key? But I believe it is optimal to allow for a mouse click event as well as a key command event.

  13. qt: peers-tab hide horizontal scroll bars ac288c197a
  14. RandyMcMillan closed this on Jun 7, 2021

  15. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me