Draw “eye” sign at the beginning of watch-only addresses #365

pull hebasto wants to merge 2 commits into bitcoin-core:master from hebasto:210614-tx changing 1 files +9 −10
  1. hebasto commented at 9:28 pm on June 14, 2021: member

    This PR guaranties that the “eye” sign won’t be hidden for very long addresses/labels.

    No longer need to extend TransactionOverviewWidget widget width to make “eye” signs shown:

    Screenshot from 2021-06-15 00-21-05

    Fixes https://github.com/bitcoin-core/gui/issues/373

  2. hebasto added the label Bug on Jun 14, 2021
  3. hebasto added the label needs backport (0.21) on Jun 14, 2021
  4. hebasto added the label UI on Jun 14, 2021
  5. hebasto added this to the milestone 22.0 on Jun 14, 2021
  6. jarolrod commented at 6:05 am on June 17, 2021: member

    ACK 18ff8eb93a297eaf1aa971b77b4d5d538578f15f

    Tested on macOS 11.3 Qt 5.15.2, Arch Linux Qt 5.15.2 and cross-compile to Windows 10.

    Notes on Commits:

    • d476f41d5f16e3f9f6f59f358cb5649657081384

    This fixes issue #22246, see: https://github.com/bitcoin/bitcoin/issues/22246#issuecomment-862846748

    The below screenshots show the behavior between master and this PR when presented with more than one address in a transaction on the overview page across the major platforms.

    Note: The before and after screenshots are taken with gui settings wiped. If a user upgrades from v0.21.1 to v22, the window will open up as wide as it was on v0.21.1. They must then resize it to their preference, this change no longer prevents you from making the window smaller (as noted in #22246)

    macOS 11.3

    Master PR
    master-issue test-365-resize

    Arch Linux

    Master PR
    22246-master 22246-pr

    Windows 10

    Master PR
    22246-master 22246-pr
    • 18ff8eb93a297eaf1aa971b77b4d5d538578f15f

    This is a nice improvement UX wise for watch only wallets. The watch symbol is placed on the left hand, could not force any weird behavior from this change.

    Below I attach screenshots of this PR applied on the major platforms for the purposes of documentation and clarity

    macOS 11.3

    Master PR
    master pr

    Arch Linux

    Master PR
    365-master 365-pr

    Windows 10

    Master PR
    365-master 365-pr
  7. in src/qt/overviewpage.cpp:109 in 18ff8eb93a outdated
    105@@ -107,9 +106,9 @@ class TxViewDelegate : public QAbstractItemDelegate
    106 
    107         painter->setPen(option.palette.color(QPalette::Text));
    108         QRect date_bounding_rect;
    109-        painter->drawText(amountRect, Qt::AlignLeft | Qt::AlignVCenter, GUIUtil::dateTimeStr(date), &date_bounding_rect);
    110+        painter->drawText(amountRect, Qt::AlignLeft | Qt::AlignVCenter, GUIUtil::dateTimeStr(date) + QLatin1String("  "), &date_bounding_rect);
    


    luke-jr commented at 0:51 am on June 27, 2021:
    Is this assuming spaces have a certain width?

    hebasto commented at 1:35 am on June 27, 2021:
    Do you prefer non-breaking space?

    luke-jr commented at 1:47 am on June 27, 2021:

    Offset the bounding rect?

    Spaces are never a well-defined width… except zero-width :)


    hebasto commented at 1:50 am on June 27, 2021:
    Offset in fixed number of pixels? Is it a good approach with potentially scalable fonts?

    luke-jr commented at 4:58 am on June 27, 2021:

    Measure the icon width.

    Scalable fonts is exactly why spaces won’t work reliably. ;)


    hebasto commented at 9:22 am on June 28, 2021:

    Is this assuming spaces have a certain width?

    Thanks! Updated.

  8. qt: Do not extend recent transaction width to address/label string 9ea1da6fc9
  9. qt: Draw "eye" sign at the beginning of watch-only addresses cd46c11577
  10. hebasto force-pushed on Jun 28, 2021
  11. hebasto commented at 9:22 am on June 28, 2021: member

    Updated 18ff8eb93a297eaf1aa971b77b4d5d538578f15f -> cd46c11577a05f3dc9eac94f27a6985f6ba0509e (pr365.01 -> pr365.02, diff):

  12. jarolrod commented at 8:28 pm on July 3, 2021: member

    ACK cd46c11577a05f3dc9eac94f27a6985f6ba0509e

    Tested only on macOS 11.3

    Changes since last review:

    addressed @luke-jr’s comment

    Conceptually it does make sense to not use text elements in drawing of visual elements.

    Confirmed that this still fixes #373 (previously #22246)

    Transactions Tab Issue

    Master PR

    Watch-Only Symbol

    Master PR
  13. hebasto merged this on Jul 5, 2021
  14. hebasto closed this on Jul 5, 2021

  15. hebasto deleted the branch on Jul 5, 2021
  16. sidhujag referenced this in commit ee4edbe912 on Jul 5, 2021
  17. hebasto removed this from the milestone 22.0 on Jul 11, 2021
  18. hebasto added this to the milestone 0.21.2 on Jul 11, 2021
  19. hebasto referenced this in commit 6ca54ce2ae on Jul 11, 2021
  20. hebasto referenced this in commit e3f1da4bf3 on Jul 11, 2021
  21. hebasto commented at 9:26 am on July 11, 2021: member
  22. hebasto removed the label needs backport (0.21) on Jul 11, 2021
  23. fanquake referenced this in commit 997e528a34 on Jul 29, 2021
  24. ComputerCraftr referenced this in commit 92a0234680 on Aug 18, 2021
  25. gwillen referenced this in commit f9ced2d442 on Jun 1, 2022
  26. bitcoin-core locked this on Aug 16, 2022


hebasto jarolrod luke-jr

Labels
Bug UI

Milestone
0.21.2


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-10-23 00:20 UTC

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