Fix TxViewDelegate layout #176

pull hebasto wants to merge 3 commits into bitcoin-core:master from hebasto:210103-delegate changing 5 files +105 −9
  1. hebasto commented at 7:00 pm on January 3, 2021: member

    This change:

    • prevents overlapping date and amount strings
    • guaranties that “eye” sign at the end of the watch-only address/label is always visible

    Fix https://github.com/bitcoin/bitcoin/issues/20826

    Here are some screenshots with this PR with the minimum available width of the transaction list widget:

    Screenshot from 2021-01-03 20-23-56 Screenshot from 2021-01-03 20-24-47 Screenshot from 2021-01-03 20-25-27 Screenshot from 2021-01-03 20-33-20

  2. jonasschnelli assigned jonasschnelli on Jan 4, 2021
  3. dooglus commented at 4:02 pm on January 4, 2021: contributor

    Looks good to me. The window is a lot bigger than it was before, and perhaps bigger than absolutely necessary but this is as small as I can make it:

    Screenshot_2021-01-04_07-58-45

    For comparison, this is the ‘before’ shot:

    Screenshot_2021-01-01_14-19-16

    Edit: the client window is made wider by this fix even for wallets that have no watchonly addresses. Is that intentional?

  4. MarcoFalke added this to the milestone 0.21.1 on Jan 4, 2021
  5. MarcoFalke commented at 4:06 pm on January 4, 2021: contributor
    Is this for 0.21.1?
  6. hebasto commented at 4:42 pm on January 4, 2021: member

    Is this for 0.21.1?

    Yes, I think so, as it is a bugfix.

  7. hebasto commented at 8:30 pm on January 4, 2021: member

    @dooglus

    The window is … bigger than absolutely necessary

    On fresh Debian 10.7 with Xfce 4.12 cannot reproduce such behavior: Screenshot from 2021-01-04 22-31-19

    Did you tweak fonts or themes?

  8. dooglus commented at 2:05 am on January 5, 2021: contributor

    Yes I did, and I’ve included a screenshot of my settings below, but I ought to describe the issue more fully now that I’ve played around with it more.

    I can reproduce the issue as follows: I have 2 wallets, one with watchonly addresses and one without. I have the one without show up by default when the client first loads, and it makes the client window 1109x842 pixels. If I then use the menu in the top right to switch to the wallet with watchonly addresses then the window resizes itself to 1329x842 to make room for the watchonly address balances as expected.

    The problem is when I switch back to the first wallet. The window stays at its increased size and I can’t shrink it back. Some screenshots:

    1. no watchonly - small window:

    new0

    1. watchonly - bigger window:

    new1

    1. back to no watchonly, but the window stays big:

    new2


    I have the following font settings:

    Screenshot_2021-01-04_16-49-04

    This is the font I’m using.

  9. hebasto commented at 8:21 am on January 5, 2021: member

    @dooglus

    Thanks for testing!

    The problem is when I switch back to the first wallet. The window stays at its increased size and I can’t shrink it back.

    Confirming this regression. Looking for a fix.

  10. qt: Add TransactionOverviewWidget class d439921406
  11. qt: Fix TxViewDelegate layout
    This change (1) prevents overlapping date and amount strings,
    and (2) guaranties that "eye" sign at the end of the watch-only
    address/label is always visible.
    f0d04795e2
  12. hebasto force-pushed on Jan 5, 2021
  13. hebasto commented at 8:53 pm on January 5, 2021: member

    Updated 5cf67f25a7d8cc75e1831aa37125f603f942b811 -> 1e31eca7bc01cbe68cef14768786a68e783ac11b (pr176.01 -> pr176.02, diff):

    The problem is when I switch back to the first wallet. The window stays at its increased size and I can’t shrink it back.

  14. jarolrod commented at 8:19 pm on January 6, 2021: member

    ACK 1e31eca7bc01cbe68cef14768786a68e783ac11b

    Tested on macOS 11.1 and Arch Linux both with Qt 5.15.2.

    I was able to replicate the bug described by @dooglus on 5cf67f25a7d8cc75e1831aa37125f603f942b811. I can confirm that 1e31eca7bc01cbe68cef14768786a68e783ac11b now fixes this for me.

  15. dooglus commented at 11:31 am on January 8, 2021: contributor

    I cherry-picked your commits back to the v0.21.0rc4 tag and built. I saw a warning:

    qt/walletframe.cpp: In member function ‘void WalletFrame::setCurrentWallet(WalletModel*)’:
    qt/walletframe.cpp:110:9: warning: init-statement in selection statements only available with -std=c++17 or -std=gnu++17
         if (WalletView* view_about_to_hide = currentWalletView(); view_about_to_hide != nullptr) {
             ^~~~~~~~~~
    

    I don’t know if I’m supposed to be using a newer compiler but it wasn’t enforced when I ran the configure script. If this is intended to be backported to 0.21.1 maybe it shouldn’t use c++17 features.

    Despite the warning the code works and I can now shrink the window back after switching to and back from the watchonly wallet.

  16. qt: Stop the effect of hidden widgets on the size of QStackedWidget
    Layouts of the hidden widgets, those are children of QStackedWidget,
    could prevent to adjust the size of the parent widget in the
    WalletFrame widget.
    af58f5b12c
  17. hebasto force-pushed on Jan 8, 2021
  18. hebasto commented at 3:03 pm on January 8, 2021: member

    Updated 1e31eca7bc01cbe68cef14768786a68e783ac11b -> af58f5b12cea91467692dd4ae71d8cc916a608ed (pr176.02 -> pr176.03, diff):

    If this is intended to be backported to 0.21.1 maybe it shouldn’t use c++17 features.

  19. dooglus commented at 4:11 pm on January 10, 2021: contributor

    ACK af58f5b.

    Now it resizes the window to make room for the watchonly addresses, allows me to shrink the window back when viewing a wallet without any such addresses, and builds without warnings when I backport it to v0.21.

  20. jarolrod commented at 7:48 pm on January 12, 2021: member

    re-ACK af58f5b12cea91467692dd4ae71d8cc916a608ed

    Saw the same warning as @dooglus when patching 1e31eca7bc01cbe68cef14768786a68e783ac11b on 0.21rc4. Confirming that no warnings come up when patching af58f5b12cea91467692dd4ae71d8cc916a608ed on top of 0.21rc5. Tested on macOS 11.1 and Arch Linux both with Qt 5.15.2

  21. hebasto commented at 8:13 pm on January 12, 2021: member

    @dooglus

    ACK 1e31eca.

    Now it resizes the window to make room for the watchonly addresses, allows me to shrink the window back when viewing a wallet without any such addresses, and builds without warnings when I backport it to v0.21.

    Thanks for reviewing! Is it intentional the previous commit (not the current top) mentioned? :smile:

  22. dooglus commented at 1:53 am on January 14, 2021: contributor
    No, sorry. I meant af58f5b. Have edited it now.
  23. MarcoFalke merged this on Jan 21, 2021
  24. MarcoFalke closed this on Jan 21, 2021

  25. hebasto deleted the branch on Jan 21, 2021
  26. MarcoFalke referenced this in commit b7086e69ff on Jan 21, 2021
  27. MarcoFalke referenced this in commit 7bc4498234 on Jan 21, 2021
  28. MarcoFalke referenced this in commit bdc64c9030 on Jan 21, 2021
  29. sidhujag referenced this in commit 7904b8431e on Jan 21, 2021
  30. apoelstra referenced this in commit e6409188ad on Sep 21, 2021
  31. apoelstra referenced this in commit 463008392b on Sep 21, 2021
  32. apoelstra referenced this in commit 1f68875b66 on Sep 21, 2021
  33. apoelstra referenced this in commit 96b0ce20db on Sep 21, 2021
  34. apoelstra referenced this in commit 54742feba6 on Sep 21, 2021
  35. apoelstra referenced this in commit 051cf31fbb on Sep 21, 2021
  36. apoelstra referenced this in commit 5823cc3b43 on Sep 22, 2021
  37. apoelstra referenced this in commit 2ccf3823cf on Sep 22, 2021
  38. apoelstra referenced this in commit ce108b0061 on Sep 22, 2021
  39. hebasto referenced this in commit 26ec2f2d6b on Jun 15, 2022
  40. sidhujag referenced this in commit 69c085e858 on Jun 15, 2022
  41. bitcoin-core locked this on Aug 16, 2022


hebasto dooglus MarcoFalke jarolrod

Milestone
0.21.1


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 02:20 UTC

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